• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to check if an image has an alpha channel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if an image has an alpha channel?


  • Subject: Re: How to check if an image has an alpha channel?
  • From: Shaun Wexler <email@hidden>
  • Date: Sat, 7 Oct 2006 12:33:15 -0700

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
  • Follow-Ups:
    • Re: How to check if an image has an alpha channel?
      • From: Tito Ciuro <email@hidden>
References: 
 >How to check if an image has an alpha channel? (From: Tito Ciuro <email@hidden>)

  • Prev by Date: MySQL cocoa help!
  • Next by Date: Calculating Lines of Text
  • Previous by thread: How to check if an image has an alpha channel?
  • Next by thread: Re: How to check if an image has an alpha channel?
  • Index(es):
    • Date
    • Thread