Mailing Lists: Apple Mailing Lists

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

Re: Colorizing on Mac OS X




On Feb 17, 2005, at 11:32 PM, David Niemeijer wrote:

Is there a way I can use quartz to colorize a bitmap image? Or, if not, is there a non-QD way to do that with Carbon or cocoa calls?

One thing that may do what you want is an image mask. Instead of creating a regular image with your bitmap data, create a mask image (e.g., CGImageMaskCreate). When you draw a mask image, the context's current fill color will be used where ever you have colored pixels in the mask. In some cases you may have to invert the mask to get the result you want. You can do this by supplying an inverted decode array when creating the image (e.g., float decode[] = {1.0, 0.0}).


Regards,
Nick Nallick

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

This email sent to email@hidden
References: 
 >Colorizing on Mac OS X (From: David Niemeijer <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.