Re: How to check if an image has an alpha channel?
Re: How to check if an image has an alpha channel?
- Subject: Re: How to check if an image has an alpha channel?
- From: Tito Ciuro <email@hidden>
- Date: Sat, 07 Oct 2006 17:57:17 -0700
Hi Shaun,
Thanks a lot for the help!
-- Tito
On Saturday, October 07, 2006, at 12:33PM, Shaun Wexler <email@hidden> wrote:
>On Oct 7, 2006, at 12:17 PM, Tito Ciuro wrote:
>
>> Hello,
>>
>> I'd like to know if a given image has an alpha channel. Is there a
>> way to know this in Cocoa?
>>
>> Thanks
>
>NSEnumerator *repEnum = [[aGivenImage representations]
>objectEnumerator];
>NSImageRep *rep;
>while ((rep = [repEnum nextObject]) && ![rep hasAlpha]));
>
>BOOL hasAlpha = rep != nil;
>
>--
>Shaun Wexler
>MacFOH
>http://www.macfoh.com
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden