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: Difficulty masking an image with another image



On 5/11/06, Peter Bates <email@hidden> wrote:
HI folks,

I'm just getting my feet wet with Quartz 2D and built a small app to
try out some functions.  The following code doesn't behave as I
expected.  Specifically the asterisked line below leaves maskedImage
as nil.  Either MyImage or aGrayScaleImage will display correctly.
Any help appreciated.
According to the documentation:
"A mask. If the mask is an image, it must be in the DeviceGray color
space, must not have an alpha component"

The CGImageCreateWithPNGDataProvider function likely returns an image
in a RGB + alpha colorspace. So using CGImageCreateWithCreateMask with
that image as a mask image will fail.

Try converting the mask image to using DeviceGray.

-Corey
--
-Corey O'Connor
_______________________________________________
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: 
 >Difficulty masking an image with another image (From: Peter Bates <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.