Re: Putting an image on a CALayer
Re: Putting an image on a CALayer
- Subject: Re: Putting an image on a CALayer
- From: Josh Abernathy <email@hidden>
- Date: Tue, 21 Oct 2008 11:54:18 -0400
Scott Stevenson uses an NSImage category with:
- (CGImageRef)cgImage
{
// I'm open to better ideas. :)
NSData* data = [self TIFFRepresentation];
return CreateCGImageFromData(data);
}
So create an NSImage and use that.
On Oct 21, 2008, at 11:46 AM, DKJ wrote:
I'd like to put an image stored in a JPEG file onto a CALayer. It
seems that I do this by assigning a CGImageRef to its contents
property. But how do I get a CGImageRef from a file? Do I make an
NSData object from the file and do something with that?
dkj
_______________________________________________
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
_______________________________________________
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