views:

912

answers:

1

Hi,

in my Cocoa application, I load a .jpg file from disk, manipulate it. Now it needs to be written to disk as a .png file. How can you do that?

Thanks for your help!

+4  A: 

Create a CGImageDestination, passing kUTTypePNG as the type of file to create. Add the image, then finalize the destination.

Peter Hosey
I can't figure out how.
ivanceras
ivanceras: http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CGImageDestination/ If you want a more specific answer, you should ask a more specific question (and you should do so as a separate question).
Peter Hosey