Removing alpha channel of pngs using Imagemagick

Apple has released new version of iTunes Connect and you would get an error message when try to send images on iTunes Connect for apps.

It would tell you that “Invalid Icon” balabala “xxx.png with an alpha channel. Icons should not have an alpha channel.” and so on.

You can check your pngs to see whether it has an alpha channel.

find . -type f -name "*.png" -exec identify -format '"%d/%f" %[channels]\n' {} \;

And you can remove their alpha channel to make apple happier.

find . -type f -name "*.png" -exec mogrify -background white -alpha off -flatten {} \;

You’d better run it in the specific directory so that you can limit the affect.

That’s all.

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.