• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Copy an image into hard disk from NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Copy an image into hard disk from NSImageView (From: Roberto <email@hidden>)

  • Prev by Date: Re: reading XML in Cocoa ?
  • Next by Date: Re: reading XML in Cocoa ?
  • Previous by thread: Copy an image into hard disk from NSImageView
  • Next by thread: Re: Word completion feature from PB missing in Xcode?
  • Index(es):
    • Date
    • Thread