Re: PNGs
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>) |