Hi all,

I can use +[NSImage canInitWithPasteboard:], and then +[NSImage 
imageWithPasteboard:] to make an NSImage object.

But I’d like to get the actual original image data from the pasteboard, knowing 
that the data is good to make an NSImage. The reason is so that when pasting an 
image, I preserve its original data format where possible. Once it’s turned 
into an NSImage object, my options are limited - if it’s a PDF, I can riffle 
through the reps and see if there’s a NSPDFImageRep, or I can ask for the image 
in TIFF or other formats, but that potentially represents a conversion loss 
from the original data. NSImage doesn’t retain its original data, so 
information is lost. To avoid that, I’d like to be able to get the data myself 
and save it in my model, making the NSImage only for local display. If the 
model is saved, the original data is saved.

So is there a way, given that if +canInitWithPasteboard: returns YES, to get 
the (NS)data off the pasteboard in whatever format it’s in, knowing that it’s 
good for making an image?

—Graham



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to