MacOS Alpha Channel issue [imagemagick]
While uploading screenshots from the Figma file to our Apple store screenshot section, we faced multiple issues:
- Alpha channel or transparency
- Image sizes are not proper (2x channel)
So what I saw was while exporting the assets we had used the 2x option for the images.
To fix the alpha image issue I used CLI option to fix for quicker results.
First we need to install imagemagick package:
brew install imagemagick
Now we can use a single command to update the entire folder and remove alpha image option. I used find
command with convert
to remove alpha.
find . -name "*.png" -exec convert "{}" -alpha off "{}" \;
I will keep adding more information in this post to keep track of useful commands to help in the development process.
Note: Such posts are Google friendly but for me I normally such for same issue again and again to find same answer. So now I have started keeping blog post to know the right answers. I had created one project called as "OnSeAn" - One Search Answer(https://onsean.robomx.com/). I need to work more on it to mature it. Code available: https://github.com/robomx/onsean