Skeptick / libres

Resources generation in Kotlin Multiplatform
Apache License 2.0
207 stars 11 forks source link

Images have unexpected tint on iOS #40

Closed j-roskopf closed 11 months ago

j-roskopf commented 11 months ago

Hey!

When displaying images on iOS, there seems to be a tint applied that does not happen on Android.

For example, I have a file in the project named dog1_(orig).png

Here is what it looks like rendering in Android Studio:

Screenshot 2023-11-04 at 2 39 30 PM

Here is how it renders on iOS:

Screenshot 2023-11-04 at 2 40 03 PM

Here is how it renders on Android:

Screenshot 2023-11-04 at 2 40 25 PM

Similarly, I have another icon named full_availability_(orig).png and here is how it renders in Android Studio:

Screenshot 2023-11-04 at 2 40 54 PM

Here is that image rendering on Android:

Screenshot 2023-11-04 at 2 41 34 PM

Here is that image rendering on iOS:

Screenshot 2023-11-04 at 2 42 01 PM

Here is sample code of how I am displaying the last image:

            Image(
                painter = MainResImages.full_availability.painterResource(),
                contentDescription = "availability",
                modifier = Modifier.size(32.dp),
            )

Using version 1.2.0 of the project.

Is there some additional configuration I need on my side that I missed? Or does it appear to be an actual issue?

Thanks!

Skeptick commented 11 months ago

Hi. What version of compose are you using? Please provide the original of one of these images, I will try to reproduce it

j-roskopf commented 11 months ago

Hey! Thanks for the quick reply. Using 1.5.10 of Compose.

Here is the image: https://drive.google.com/file/d/1xltTYhLvW4zcNwvYnHcWX10YqSTlbrkh/view?usp=sharing

Skeptick commented 11 months ago

Yes, this is bug. I published version 1.2.1 with fix

j-roskopf commented 11 months ago

Updated to 1.2.1 and verified images look as expected on iOS. Thanks!