• 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: PNGs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PNGs


  • Subject: Re: PNGs
  • From: Jeff LaMarche <email@hidden>
  • Date: Fri, 16 Sep 2005 13:46:17 -0400

On Sep 16, 2005, at 1:19 PM, Rick Langschultz wrote:

I was wondering if there are any resources for composing PNG images in Cocoa.


Just compose in an NSImage (srcImage) :

NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData: [srcImage TIFFRepresentation]];
NSData *pngData = [imageRep representationUsingType: NSPNGFileType properties: nil];


Now you have the PNG version of the image stored in an NSData to do with as you please. You can, of course, create an NSDictionary to define the properties to use when creating the PNG.. look in the doc for NSBitmapImageRep for more info...

(Note - untested code, I make no warranties of any kind =) )

Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >PNGs (From: Rick Langschultz <email@hidden>)

  • Prev by Date: PNGs
  • Next by Date: Re: PNGs
  • Previous by thread: PNGs
  • Next by thread: Re: PNGs
  • Index(es):
    • Date
    • Thread