On Oct 22, 2008, at 12:09 AM, Patrick Mau wrote:
On 22.10.2008, at 02:54, DKJ wrote:
Me again. I've been using this code:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source =
CGImageSourceCreateWithURL((CFURLRef)url, NULL);
CGImageRef image = CGImageSourceCreateIm
On 22.10.2008, at 02:54, DKJ wrote:
Me again. I've been using this code:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url,
NULL);
CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, NULL);
CFRelease(sour
Me again. I've been using this code:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url,
NULL);
CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, NULL);
CFRelease(source);
theView.layer.co
On Oct 21, 2008, at 3:13 PM, douglas welton wrote:
On Oct 21, 2008, at 4:00 PM, DKJ wrote:
OK, I tried this:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source =
CGImageSourceCreateWithURL((CFURLRef)url, NULL);
CGImageRef image = CGImageSourceCreateImageAtIndex(
On Oct 21, 2008, at 4:00 PM, DKJ wrote:
OK, I tried this:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url,
NULL);
CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, NULL);
CFRelease(source);
OK, I tried this:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url,
NULL);
CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, NULL);
CFRelease(source);
theView.layer.contents = image;
an
On Oct 21, 2008, at 8:50 AM, Jean-Daniel Dupas 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 someth
On Oct 21, 2008, at 10:54 AM, Josh Abernathy wrote:
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
On 21 Oct, 2008, at 08:51, Alex Heinz wrote:
then draw the NSImage to the CALayer
This is the bit I'm not sure how to do. I see a CALayer contents
property, but I can't assign an NSImage to that.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple
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'
Le 21 oct. 08 à 17:46, DKJ a écrit :
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?
You could use [[NSImage alloc] initWithContentsOfFile:], and then draw
the NSImage to the CALayer.
HTH,
Alex
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.
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
___
13 matches
Mail list logo