ios - Images can't contain alpha channels or transparencies

ID : 7873

viewed : 181

Tags : iosiphoneitunesapp-store-connectios





Top 5 Answer for ios - Images can't contain alpha channels or transparencies

vote vote

90

I've found you can also just re-export the png's in Preview, but uncheck the Alpha checkbox when saving.

enter image description here

vote vote

82

AFAIK png with transparency is not allowed. use jpg OR update your png (photoshop or whatever you using to create the png) and delete the transparency areas. if you work with shadows, use jpg, that will do no headaches.

vote vote

77

it so easy...

Open image in Preview app click File -> Export and uncheck alpha

vote vote

60

For this i made a new simple tool. You can remove alpha channel (transparency) of multiple .png files within seconds.

Alpha Channel Remover

You can download from here http://alphachannelremover.blogspot.com

vote vote

57

Use mogrify tool from ImageMagick package to remove alpha channel.

brew install imagemagick cd folder_with_images mogrify -alpha off */*.png 

Update from May 3

You can tell whether image contains alpha channel by running:

sips -g all image.png 

In case you render screenshots in iOS Simulator you can drop alpha channel by passing BOOL opaque = YES to UIGraphicsBeginImageContextWithOptions:

UIGraphicsBeginImageContextWithOptions(imageSize, YES, 0);  

Top 3 video Explaining ios - Images can't contain alpha channels or transparencies







Related QUESTION?