FROM : R. Scott Thompson
DATE : Mon Oct 04 19:39:23 2004
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>
DATE : Mon Oct 04 19:39:23 2004
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>
| Related mails | Author | Date |
|---|---|---|
| Glen Simmons | Oct 4, 18:25 | |
| R. Scott Thompson | Oct 4, 19:39 | |
| Glen Simmons | Oct 4, 19:58 | |
| R. Scott Thompson | Oct 4, 20:27 | |
| Glen Simmons | Oct 4, 21:11 |






Cocoa mail archive

