I have an app icon for iOS but Apple doesn't allow alpha to be in the image. How to remove this alpha channel? I only have the png image with me I don't have the source file as my friend did the image for me.
11 Answers
The accepted answer to export to JPG, then back to PNG is not recommended.
- It's an extra step in the process (2 exports)
- JPG is lossy, so you will lose some image data
Here's a super fast and easy way to do this without the extra export or saving to (lossy) JPG:
Using Preview app (Mac):
- Open the image
- Command-Shift-S to Duplicate (creates a copy)
- Command-S to Save
- Deselect the "Alpha" checkbox
- Delete " copy" from filename (including the space)
- This will overwrite your original, if you want to keep the original, just leave "copy" in the name
- Save
- Click 'Replace' to confirm you want to overwrite the original

- 4,602
- 5
- 24
- 32
-
2^ this is a better answer, IMHO. JPG doesn't support alpha channels and this will allow you to use a LOSSLESS format and deal with the alpha channel (instead of avoiding it). – Cody-PHP-jQuery Jul 18 '16 at 16:28
-
4I do not understand why iTunes Store Team show this error (Alpha channel) in watch app icons, when in previous versions they consider them correct. Lost time! Thank you Apple Inc! – Markus Sep 21 '16 at 09:37
-
15With macOS High Sierra, Preview seems to save PNGs always WITH an alpha channel, even if the checkbox is unchecked. If I open the saved file, the info box always says "Has Alpha: 1". The sips tool also tells me `hasAlpha: yes`. Plus, iTunes Store complains about the unwanted alpha channel ("Operation Failed – The App Store icon … can't be transparent nor contain an alpha channel"). – Stefan Oct 15 '17 at 19:57
-
3As mentioned by @Psychomentally, ImageMagick finally worked for me: `convert in.png -alpha off out.png`. Re. Preview: switching "alpha" on/off in the export dialog changes the predicted file size, but saving always writes the file with alpha information (and corresponding size). – Stefan Nov 03 '17 at 18:56
-
-
Worked for me, except instead of Save, had to do Export from the File Menu. Saving wouldn't give me with dialog to uncheck the Alpha channel. – Chris Amelinckx Dec 28 '18 at 18:15
-
-
To follow up on the comment by [Chris Amelinckx](https://stackoverflow.com/users/655625/chris-amelinckx) in macOS Big Sur (11.6.4), I could not find **any** checkbox for alpha, not on the Save dialog and not on the Export dialog. – Craig Reynolds Feb 26 '22 at 02:01
-
if you need remove all alpha channel from directory with icons use this command:
for i in `ls *.png`; do convert $i -background black -alpha remove -alpha off $i; done
if you have Mac OS Mojave and had "convert command not found"
brew install imagemagick
To install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
-
2
-
4If you change `-alpha remove -alpha off $i;` to `-alpha remove -alpha off png24:$i;` it will output a 24bit png – Lawrence Ryerson Davis IV Feb 29 '20 at 04:40
-
Your suggestion broke Xcode and now I can't run my command line script to build all of my targets because of what this install overwrote. The imagemagik install took a long time and installed a ton of stuff that I now have to remove. Can you show a few command lines that I can use to remove all of what I just installed? – David Rector Jan 11 '22 at 20:02
-
I like the command line option. But `ls *.png` seems unnecessarily fragile, and will do unexpected things if filenames contain spaces. Would it not be better to do `for i in *.png`? For the same reason, you should also double-quote both instances of "$i" in the convert command. – mwfearnley Apr 11 '22 at 09:21
Assuming you don't have another image editor, then you can open it in Preview on your Mac, and use the Export option to resave it in a different format- to ensure you get rid of the alpha channel, it might be best to export to JPG (best quality), then open that and export it as a PNG again.
Having said that, I suspect you're probably OK submitting an icon with a transparency channel as long as there's no actual transparency.

- 861
- 7
- 4
-
13This will result in a small amount of quality loss, and also a larger PNG file as the PNG format isn't suitable compressing the sort of artifacts you get when producing a JPG file. In addition Apple does reject PNG images with alpha channels even if there's no actual transparency. – philwilks Jul 21 '16 at 08:52
-
-
19You can actually just uncheck the "Alpha" checkbox while exporting to PNG. No need to export to JPG first. – Petr Peller Nov 01 '18 at 19:09
-
How to do operation on image data to reduce image channels from 4 to 3? – WW00WW Jan 26 '19 at 12:00
-
8Any PNGs with a transparency channel will not be accepted, no matter if transparency shows in image or not. – gannonbarnett Apr 08 '19 at 21:25
If you are using the Preview app, there's no need to export then re-export between jpg and png, just choose export and below the filetype (PNG) you will see an alpha checkbox, unset it and save.

- 9,018
- 12
- 53
- 77

- 5,691
- 5
- 34
- 56
-
6I used to use this method, but on MacOS High Sierra, unchecking Alpha in Preview doesn't do anything unless you choose JPG as the output. If I try to open a PNG, Export PNG w/o Alpha, and open the new PNG, it has an Alpha channel. – Dan Loughney Oct 26 '17 at 00:44
-
2
There's no need to export the image to jpg first. You can uncheck the checkbox for the alpha channel and export directly from a png to a png without alpha channel in the preview app.

- 5,203
- 8
- 27
- 51
You can try imagemagick (also easily resize for different sizes):
convert in.png -background black -alpha remove -alpha off -resize 1024x1024 out.png

- 649
- 1
- 7
- 12
-
-
Marlhexs-MacBook-Pro:Edgar marlhex$ ls LUNCH SCREEN.jpg nuevo icon-5.png LUNCH SCREEN.png nuevo icon-51024 copy.jpg nuevo icon-5.jpg nuevo icon-51024.png Marlhexs-MacBook-Pro:Edgar marlhex$ nuevo icon-51024.png -bash: nuevo: command not found – Marlhex Oct 30 '19 at 18:57
Just got the the following error when trying to upload my app to the iTunes app store:
iTunes Store Operations Failed
ERROR ITMS-90717: "Invalid App Store Icon. The App Store icon in the asset catalog in 'MyApp.app' can't be transparent nor contain an alpha channel."
I confirmed that my app store icons did include the alpha channel by locating the asset in Finder and looking up its info (⌘+i). Underneath More info, it showed:
Alpha channel: Yes
Found the solution above to use Preview to remove the alpha channel by exporting it with the Alpha checkbox unchecked, but figured a way to batch export them since I had 18 assets I needed to strip the alpha channel from.
The way I got batch exporting to work was to select all my app icon assets in finder > right click > open (or open with preview)
All of the assets will now appear in the same window. Select all (⌘+a), and then select File > Export Selected Images… > Expand Options > uncheck the Alpha checkbox > Choose (your destination folder)
Done! All your images are now exported with the alpha channel stripped off.

- 1
- 1

- 4,549
- 2
- 32
- 36
-
1I tried the same but it is not working anymore on High Sierra. Alpha channels are not removed on Preview. – Satheesh Dec 19 '17 at 09:54
-
1
-
1
To remove alpha channel from png:
on Mac: Preview version 9.0 (macOS Sierra) can remove the alpha channel if you export or save the image.
Preview version 10.0 (944.2) (macOS High Sierra) does not remove the alpha channel. Both Export and/or Save does not remove the alpha channel from the image.

- 101
- 1
- 3
-
3This highlights 2 recent facepalm issues by Apple.... High Sierra ignoring a save option AND the reason many people are here, Xcode suddenly can't upload apps because of icon transparency – MobileVet Dec 06 '17 at 15:40
Well, since you're on a Mac, next time you probably just want to use Automator. Convert the image to BMP (lossless) and back to PNG. Let it save and voila...

- 685
- 4
- 12
I put Nikita Pushkar's very nice solution into a shell script that converts all iOS icons found in res/icon/ios
:
It uses brew to install imagemagick if not available, so I guess it will run only on Mac.
#! /usr/bin/env bash
#
# remove alpha channel from PNG images when App Store upload fails
#
# taken from https://stackoverflow.com/a/52962485 - @Nikita Pushkar
#
# make sure to have brew installed, see https://brew.sh:
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#
# make sure to have imagemagick installed, see https://imagemagick.org:
# brew install imagemagick
#
if command -v convert; then
echo "imagemagick seems to be installed"
else
echo "imagemagick not installed, trying to install ..."
if command -v brew; then
echo "brew is installed, using it"
else
echo "brew not installed, trying to install ..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew install imagemagick
fi
for i in `ls res/icon/ios/*.png`;
do
echo "convert $i"
convert $i -background white -alpha remove -alpha off $i;
done

- 2,927
- 5
- 33
- 40
I've used a tool (anyone that allows to convert images to any format from any format). Here are the steps:
1. Transform all png images to jpeg
2. Transform the jpeg images back to png.
Try to upload a new build.

- 1,471
- 16
- 17