objective c - How to tell if PNG file has an Alpha Channel / Transparency -


trying find best / easiest way using objective c on mac osx if png file has alpha channel.

here's 1 way:

nsbitmapimagerep *rep = [nsbitmapimagerep imagerepwithcontentsoffile:@"/path/to/image/test.png"]; bool alpha = [rep hasalpha]; 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -