Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compositing to custom view in Cocoa



Hi everyone.
I'm still struggling to find out how to replace colors in an image, before I draw it to the screen.


Basically I have a black and white image, as an image resource in my bundle, and subsequently as an NSImage in my app.

When I draw it in my custom view, I'd like to replace all the 'white' pixels with my current background color, and all the black pixels with a specific fore-ground color.

I've been all through the NSImage and NSView docs, but can't seem to come close to this.

For an example of what I'm doing look at http://www.kmillar.co.uk/mac/ macstuff.html

Thanks in advance everyone.

-Kenny
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.