Changing the Color Space of NSImage
问题 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. 回答1: 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. 回答2: The problem with the code you see below CGImageRef CGImageCreateCopyWithColorSpace (