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: image file as 1-bit mask



Scott Thompson wrote:

On Mar 20, 2008, at 2:03 PM, James Walker wrote:

I want to create a 1-bit mask from an image file. I can create a CGImageRef from the file, but then what? CGImageMaskCreate wants the bitmap in memory, but apparently CGBitmapContextCreate cannot create a 1 bit per component bitmap context.

Create an 8 bit per component grayscale bitmap context and draw the image into that. Then create the mask from the grayscale image data.

In other words, I can't make a 1-bit mask, but I don't really need to. That does seem to work. Thanks.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________
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: 
 >image file as 1-bit mask (From: James Walker <email@hidden>)
 >Re: image file as 1-bit mask (From: Scott Thompson <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.