CocoaDev

Edit AllPages

How do you convert one NSImageRep type into another NSImageRep type? Specifically, I want to convert a TIFF sourced NSImage into a PDF sourced NSImage. What is the best way to do this?

Thanks for any help!

– RyanBates

Same problem: I have a NSImage with a NSBitmapRepresentation and I’d like to have a NSPDFRepresentation. Any help ? Thanks !


Correct me if I’m wrong, I’ve not tried this but can you not:

– RobbieDuncan

Locking focus and drawing into an NSImage will typically not modify any of the NSImageReps contained within, but rather create a new NSCachedImageRep and do the drawing there. Obviously if an NSCachedImageRep is already present then it won’t make a new one.