Hi Kyle, just checked. "Retagging" sounds like "assign profile", not
converting from a profile to another one. Am I right?

In case of CMYK profile when I call
   [window setColorSpace:cmykColorSpace];
I get the following error. I think the device can't support it.

error [1000] setting colorSpace to Coated FOGRA27 (ISO 12647-2:2004)
colorspace

When I call [rep bitmapImageRepByRetaggingWithColorSpace:cmykColorSpace];
using a CMYK profile, I get a nil representation.
Same trouble with profiles as "Blue Tone".
In case of RBG profiles it works well and fast. But I need CMYK too.

At this point, just to begin, I would need to separate the CMYK profiles
from the RGB ones. Should I look at NSColorSpace numberOfColorComponents
API?


Regards
-- Leonardo


> Da: Kyle Sluder <k...@ksluder.com>
> Data: Wed, 12 Mar 2014 15:36:22 -0700
> A: Leonardo <mac.iphone....@gmail.com>, <cocoa-dev@lists.apple.com>
> Oggetto: Re: bitmapImageRepByConvertingToColorSpace on the fly
> 
> On Wed, Mar 12, 2014, at 02:13 PM, Leonardo wrote:
>> Hi, I properly draw an imageRep within a NSView using
>> 
>> [rep drawInRect:inRect fromRect:fromRect operation:NSCompositeSourceOver
>> fraction:1.0  respectFlipped:YES hints:nil];
>> 
>> Now I would like to simulate the result of adopting a given ICC color
>> profile. So, if for instance I choose a gray profile I see all the images
>> grayed out. I have been successfully using
>> 
>>     bitmapImageRepByConvertingToColorSpace:
>> 
>> and I get the right result. When I change the profile I rebuild my
>> representation, the I always use that.
>> Anyway, when I have several images on the page, it takes a long long
>> time.
>> So, I would like to know whether there is a way to get the same result
>> just
>> modifying the profile on the NSView's context, e.g. in the NSView's
>> drawRect: method or applying a CIFilter, if that will not slow down the
>> rendering speed. Any way?
> 
> You could try creating an overlay window and setting its color space to
> your target color space using -setColorSpace. Put an NSImageView in that
> window, and hand it a version of your image that you've retagged into
> the destination colorspace using
> -bitmapImageRepByRetaggingWithColorSpace:.
> 
> N.B.: This might not actually be any faster. I've never tried it.
> 
> --Kyle Sluder


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to