Re: Copy an image into hard disk from NSImageView
Re: Copy an image into hard disk from NSImageView
- Subject: Re: Copy an image into hard disk from NSImageView
- From: Alastair Houghton <email@hidden>
- Date: Thu, 11 Dec 2003 14:30:45 +0000
On 11 Dec 2003, at 13:51, Roberto wrote:
>
How can I copy the image inside the NSImageView into a predefined
>
location of the hard Disk?
Use NSImageView's -image method to get the image, then either use
-TIFFRepresentation to obtain TIFF data corresponding to that image
(which you can then write to disk), or look through the image
representations for the type of representation you want and work from
there (e.g. if you want a bitmap, look for a suitable NSBitmapImageRep,
which can provide data in variety of formats including TIFF, BMP, GIF,
JPEG and PNG... look at the -representationUsingType:properties: method
for more information).
Another option, if you want PDF or EPS data, is to use NSView's
-dataWithPDFInsideRect: or -dataWithEPSInsideRect: methods.
Kind regards,
Alastair.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.