• 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: Loading Bitmaps with Transparency (Newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading Bitmaps with Transparency (Newbie)


  • Subject: Re: Loading Bitmaps with Transparency (Newbie)
  • From: "John C. Randolph" <email@hidden>
  • Date: Sat, 24 Nov 2001 23:45:20 -0800

On Saturday, November 24, 2001, at 10:31 PM, Eric Hon-Anderson wrote:

> I have a large number of bitmap (.bmp) files in which all pixels with a
> specific color (red=0, green=255, blue=0) are intended to be
> transparent. I can read and display the files themselves just fine with
> NSImage, but when drawing or compositing the images, the green is drawn
> like any other color would be (no surprise, since I don't know how to
> tell the system I want the green to vanish). My question is, what
> SHOULD I do to make it vanish? (Given the number of files, I hope you
> won't say, "make the images tranparent in Photoshop by hand.")

Let's see..

I think that in your shoes, I'd be writing a -chromaKey method for
NSBitmapImageRep that examined the image data, and converted any
RGB(0,255,0) pixel to an RGBA(0,0,0,0) pixel.

-jcr


Support your right to protest a criminal nut-cult.
http://freehenson.da.ru/


References: 
 >Loading Bitmaps with Transparency (Newbie) (From: Eric Hon-Anderson <email@hidden>)

  • Prev by Date: Loading Bitmaps with Transparency (Newbie)
  • Next by Date: larger Drawer
  • Previous by thread: Loading Bitmaps with Transparency (Newbie)
  • Next by thread: larger Drawer
  • Index(es):
    • Date
    • Thread