Is there any way to write out an image without a color space attached?

I'm trying to write out png and jpeg files, without a color profile attached to them via CGImageDestinationCreateWithData + a CGImageRef of my making. I can't seem to figure out a way to do this though. Any pointers?


(And to the someone who is going to pipe up with how this is a _very bad idea_: thanks, I know. I have my reasons).


-gus

Replies

I'm going to answer my own question here: You need use CGImageCreateCopyWithColorSpace with CGColorSpaceCreateDeviceRGB


(thanks to Ken Ferry for this).