Skip to content

Conversation

punty
Copy link

@punty punty commented May 21, 2019

In iOS/Watch we don't need to read the ICC profile from the encoded image since iOS does not support device agnostic color spaces.
Remove reference to empty project file

punty added 2 commits May 21, 2019 12:04
…mage since iOS does not support device agnostic color spaces. Remove reference to empty project file
@kinarobin
Copy link
Member

*.perspectivev3
!default.perspectivev3
xcuserdata/
xcshareddata/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, This also shouldn't be added to this place! You can see #2585 firstly.

@punty
Copy link
Author

punty commented May 21, 2019

@kinarob thanks for your comment. As mentioned in SDWebImage/SDWebImage#2585 on iOS on iOS/tvOS/watchOS, it only supports device-dependent color space.
So if we are on those devices there is no need to read the ICC profile from the file, since it will be overridden (correctly because otherwise the app will crash)
I was reading from Apple documentation that:

iOS does not support device-independent or generic color spaces. iOS applications must use device color spaces instead.

So I was thinking what's the point of reading the ICC profile in the iOS?
(maybe I am missing something)

@kinarobin
Copy link
Member

kinarobin commented May 22, 2019

@punty WebP contains ICC Profile should use the desired colorspace, instead of default device colorspace. See https://developers.google.com/speed/webp/docs/riff_container#color_profile.
And you iOS app had crash when use ICC profile ?

@dreampiggy
Copy link
Contributor

dreampiggy commented May 29, 2019

@punty Actually. Since iOS use device-depent colorspace, it does not support the thing like ColorSync on macOS.

on macOS, we can use NSCalibratedRGBColorSpace, it can be profiled to change. Which means the ColorSpace can be controlled and modified by end-user using ColorSync.

However, iOS/tvOS/macOS does not support this. Which means, the image data itself, controls the ColorSpace, it's read-only. If I view a custom-ICC profile image on iPhone 5 (sRGB) with kCGColorSpaceSRGB, it looks great. However, when put it on iPhone X (P3) with kCGColorSpaceSRGB, it looks bad. This is why we should keep the ICC profile, it's used to correct the look on different hardware screen.

Learn more here: https://developer.apple.com/library/archive/technotes/tn2313/_index.html

@punty
Copy link
Author

punty commented May 29, 2019

I understand thanks for the explanation! I will close this PR since it's not relevant

@punty punty closed this May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants