Re: Avoiding color transformations in PNG/UIImage/CGImage ops?
Re: Avoiding color transformations in PNG/UIImage/CGImage ops?
- Subject: Re: Avoiding color transformations in PNG/UIImage/CGImage ops?
- From: Vince DeMarco <email@hidden>
- Date: Fri, 17 Nov 2017 14:03:11 -0800
> On Nov 17, 2017, at 1:45 PM, Rick Mann <email@hidden> wrote:
>
>
>
>> On Nov 17, 2017, at 13:36 , Vince DeMarco <email@hidden> wrote:
>>
>>
>>
>>> On Nov 17, 2017, at 1:28 PM, Rick Mann <email@hidden> wrote:
>>>
>>> Nope, I'm definitely looking at pixel data. But I'll try the generic color
>>> space. I don't know how it chooses device color space when it's created
>>> absent any particular display-associated context.
>>
>> Don't use the generic color space use sRGB for both.
>>
>> Like this instead
>>
>> colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
>
> Thanks. Can you elaborate as to why?
All of the devices now default to sRGB, the Asset catalogs when presented with
an color png file will convert them to sRGB (extended range srgb for Deep color
images).
the jpeg reader in the system (ImageIO) if it finds a image with no color space
will assume sRGB.
Always best to be explicit in what you want.
Vince
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden