iOS 9.3 Color Management / Profiles
Asked Answered
R

1

8

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

Routinize answered 25/3, 2016 at 19:9 Comment(0)
T
2

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...".

Thermaesthesia answered 28/3, 2016 at 19:15 Comment(2)
You say your files are not tagged. In that case, your best guess as a source colorspace will be sRGB ( but you're better off with tagged images if you can, this way you'll get much better results ).Thermaesthesia
CGColorSpaceCreateDeviceRGB() caused the colors to behave between and Air 2 and the Pro but older devices were different (of course). I ended up checking a range +1/-1 of each rgb value to return a match and that seems to have done what I needed. Color space is now not an issue, device OS and screen depth is also not an issue.Routinize

© 2022 - 2024 — McMap. All rights reserved.