I have a black and white NSImage with some pixels in the image totally transparent.

I need to change the white pixels to black, the black pixels to white, and leave the transparent area in the image alone.

The only solution that comes immediately to mind is to get a bitmap representation of the image, loop over all of the pixels and invert each one by one. Based on the kind of image I am dealing with, this should be just fine.

However, I am thinking there is an easier solution, but my mind is drawing a blank - probably because it is getting late and I should go home.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to