Re: setting up multiple reps for an image...
Re: setting up multiple reps for an image...
- Subject: Re: setting up multiple reps for an image...
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 17 Jan 2002 09:36:08 -0800
On Wednesday, January 16, 2002, at 11:05 PM, Michael B. Johnson wrote:
>
Let's say I have an NSImage that's RGBA. I already have a
>
NSBitmapRep that's the RGBA, but I want to have the ability to
>
show just the alpha version or the luminance version of the
>
image. What's the best way to do this? Subclass NSImageRep
>
for several different kinds of single channel images?
>
>
ideas?
It shouldn't even require subclassing.
If you want to display a grey-scale image of the alpha, I'd make
another NSBitmapImageRep with 8-bit pixels in a B/W color space,
and manually copy the alpha bytes over.
-jcr
"This is not a book to be tossed aside lightly. Rather, it
should be hurled with great force." -Dorothy Parker