Document reference for working with bitmaps in Cocoa?
Document reference for working with bitmaps in Cocoa?
- Subject: Document reference for working with bitmaps in Cocoa?
- From: Rob Ross <email@hidden>
- Date: Tue, 24 Oct 2006 11:54:42 -0700
Hi all.
I've been working with the NSBitmapImageRep class in order to create
bitmaps from Raster/Sample data I am obtaining from an external source.
I'm having problems getting the "alpha channel" to work correctly.
If I exclude alpha, my bitMapData is just an array of bytes (unsigned
char*) that contains the pixels samples in RGB format (three bytes
per pixel.)
But if I include an alpha byte in ARGB format, my bitmap no longer
displays. Actually, it's all white, but when I draw it selected, with
a blue background, my image shows up but only the Red colors show.
So clearly, I'm not understanding how I'm supposed to format the
bitMapData array when I want to include an alpha channel.
I would appreciate any document references on this subject. I've read
the API docs for NSImage, NSImageRep, and NSBitmapImageRep. I also
have the Bunny Core Graphics book, but that's a much lower-level API
and doesn't cover this topic.
Thanks,
Rob Ross, Lead Software Engineer
E! Networks
email@hidden
---------------------------------------------------
"Beware of he who would deny you access to information, for in his
heart he dreams himself your master." -- Commissioner Pravin Lal
_______________________________________________
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