Loading an bitmap from NSImage with alpha?
Loading an bitmap from NSImage with alpha?
- Subject: Loading an bitmap from NSImage with alpha?
- From: Jonathan del Strother <email@hidden>
- Date: Wed, 17 Mar 2004 01:05:37 +0000
I'm trying to load a .tga file with an alpha channel into an OpenGL
texture.
To do so, I'm loading the image with NSImage and getting the bitmap
data with TIFFRepresentation :
NSImage* image = [[NSImage alloc]
initWithContentsOfFile:@"Particle.tga"];
NSBitmapImageRep* bitmap = [[NSBitmapImageRep alloc]
initWith
Data:[image TIFFRepresentation]];
However, [bitmap hasAlpha] now returns false - either NSImage isn't
loading it to start with, or it's not getting transferred with the
TIFFRepresentation. Any ideas what's wrong?
Thanks,
Jon
_______________________________________________
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.