Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 9.3 Color Management / Profiles

I have many apps that rely on rgb value checking based on tapped pixels. If I tap a pixel that returns 128/128/138 then it opens up this particular thing from an array. With 9.3 this no longer works as I am getting crazy color values returned.

I did some digging and discovered that iOS now has color profile support. My files have no profile at all associated. This seems to be the problem.

Each display since retina 3 has returned slightly different saturations which I have had to adjust for. But this reveals a much bigger problem (for me at least).

Is there a way to disable color profile management in iOS 9.3? If so, maybe a check to see what OS I am on and only disable it then? Or maybe add a profile (ignored under 9.3 so good there) that will make them work on 9.3?

Thank you

like image 805
malaki1974 Avatar asked Mar 25 '16 19:03

malaki1974


1 Answers

Your best bet is to convert whatever you are drawing to screen (and then picking as pixels) to the colorspace returned by CGColorSpaceCreateDeviceRGB(). Using this colorspace, the compositing system will know to not do anymore conversions on your data.

Directly from the docs: "Colors in a device-dependent color space are not transformed or otherwise modified when displayed on an output device...".

like image 184
Alex Avatar answered Oct 13 '22 12:10

Alex