Hi everybody. Is there a way I can change the color space of an NSimage or NSBitmapImageRep/CGimage or the like. I am open to any way. Preferably the way photoshop does it.
A:
CGImageRef CGImageCreateCopyWithColorSpace (
CGImageRef image,
CGColorSpaceRef colorspace
);
To get a CGColorSpaceRef, you can do things like
CGColorSpaceRef CGColorSpaceCreateDeviceRGB();
OR see this page for how to create other color spaces.
Amorya
2010-07-15 16:57:57
Hmm. I tried that and it didn't work when I tried to use a GrayScale colorspace.
Alex Zielenski
2010-07-15 17:20:03