• 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: Changing the background of a 1 bit bitmap?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the background of a 1 bit bitmap?


  • Subject: Re: Changing the background of a 1 bit bitmap?
  • From: "R. Scott Thompson" <email@hidden>
  • Date: Mon, 4 Oct 2004 12:39:23 -0500


On Oct 4, 2004, at 11:25 AM, Glen Simmons wrote:

I'm creating an NSImage from some 1 bit bitmap data using the -[NSBitmapImageRep initWithBitmapDataPlanes:pixelsWide: ...] method passing NSCalibratedBlackColorSpace so that 1 bits become black pixels and 0 bits become white pixels. I'd like the 0 bits to become a color of my choice instead of white. Is there an easy way to do this?

What you want is a different Compositing operation (NSCompositeSourceOver I think). There doesn't appear to be a way to do that with an NSImageView. Perhaps you could create a custom view and use NSImage calls yourself?

Scott

--
Macintosh Software Engineering Consulting Services
Visit my resume at <http://homepage.mac.com/easco/RSTResume.html>

_______________________________________________
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
  • Follow-Ups:
    • Re: Changing the background of a 1 bit bitmap?
      • From: Glen Simmons <email@hidden>
References: 
 >Changing the background of a 1 bit bitmap? (From: Glen Simmons <email@hidden>)

  • Prev by Date: Re: Can NSImageView not antialias a bitmap image?
  • Next by Date: Re: Changing the background of a 1 bit bitmap?
  • Previous by thread: Changing the background of a 1 bit bitmap?
  • Next by thread: Re: Changing the background of a 1 bit bitmap?
  • Index(es):
    • Date
    • Thread