• 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: NSImage to JPEG file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage to JPEG file?


  • Subject: Re: NSImage to JPEG file?
  • From: Carl Hoefs <email@hidden>
  • Date: Wed, 16 Jan 2019 09:32:26 -0700

Thanks Wim and Gerd. It was the NSData tie-in I didn't know. (I was expecting
NSImage to have innate export capabilities, but this works too.)

-Carl


> On Jan 16, 2019, at 7:56 AM, Wim Lewis <email@hidden> wrote:
>
> On Tue, Jan 15, 2019 at 08:10:58PM -0700, Carl Hoefs wrote:
>> Using NSBitmapImageRep, is it possible to write the JPEG representation out
>> to a .JPG file on disk?
>
> The normal way is to get the JPEG representation as a NSData and then
> write that NSData to disk using (e.g.) -writeToFile:options:error:.
>
> The ImageIO functions allow you to stream the data to disk (instead of
> creating a complete representation in memory before writing), which can
> be more efficient, but in my experience this is rarely a concern.
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSImage to JPEG file?
      • From: Jens Alfke <email@hidden>
References: 
 >Re: Cocoa-dev Digest, Vol 16, Issue 1 (From: Bruce Stephens <email@hidden>)
 >Re: NSImage to JPEG file? (From: Jens Alfke <email@hidden>)
 >Re: NSImage to JPEG file? (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: NSImage to JPEG file?
  • Next by Date: Re: NSImage to JPEG file?
  • Previous by thread: Re: NSImage to JPEG file?
  • Next by thread: Re: NSImage to JPEG file?
  • Index(es):
    • Date
    • Thread