Category Archives: Tools

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.