• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setting up multiple reps for an image...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >setting up multiple reps for an image... (From: "Michael B. Johnson" <email@hidden>)

  • Prev by Date: NSWorkspace File System Methods
  • Next by Date: Re: Draggable NSImage of custom NSView ???
  • Previous by thread: setting up multiple reps for an image...
  • Next by thread: SOUND RECORDING !?
  • Index(es):
    • Date
    • Thread