Re: Cocoa won't draw CMYK jpeg [SOLVED]
Re: Cocoa won't draw CMYK jpeg [SOLVED]
- Subject: Re: Cocoa won't draw CMYK jpeg [SOLVED]
- From: Robert Clair <email@hidden>
- Date: Thu, 13 Sep 2007 12:32:55 -0400
The hackery outlined in the earlier post (feed the CGImageSource into
a CGImageDestination to produce tiff data and then using the tiff
data to initialize an NSBitmapImage rep) seems to work just fine.
It also suggests an (ugly but workable) way to extract the profile
from an CGColorSpaceRef (if it has one): Create a CGBitmapContext
with the CGColorSpaceRef, draw something, extract a CGImage, feed the
CGImage to a tiff data producing CGImageDestination, feed the data to
an NSBitmapImage, and extract the profile via [NSBitmapImageRep
valueForProperty: NSImageColorSyncProfileData].
You could also extract the profile from a CGImage the same way.
Again, ugly, but probably less ugly than launching sips with NSTask,
which was the only solution mentioned in the archives.
...Bob
_______________________________________________
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