Re: Display a icns resource in Cocoa?
Re: Display a icns resource in Cocoa?
- Subject: Re: Display a icns resource in Cocoa?
- From: "Clark S. Cox III" <email@hidden>
- Date: Mon, 17 Mar 2003 16:29:23 -0500
On Monday, Mar 17, 2003, at 15:59 US/Eastern, Colin Cornaby wrote:
I have a raw icns data resource I want to display within an NSView.
What is the best way to go about this? Can an NSView natively read
icns? The data for the icns resource is stored as NSData. Thanks in
advance.
You can create an NSImage object from a *.icns file (or practically any
other image file) like so:
NSImage *myImage = [[NSImage alloc] initWithContentsOfFile:
@"path/to/file.icns"];
--
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
_______________________________________________
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.