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
Post a Comment