381

Apple has released new version of iTunes Connect & I got an error message when I tried to set Screenshots on itunes connect for my app.

"Images can't contain alpha channels or transparencies." 

enter image description here

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Yasika Patel
  • 6,356
  • 3
  • 19
  • 21
  • That is not mentioned in iTunes Connect Developer Guide: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/FirstSteps.html#//apple_ref/doc/uid/TP40011225-CH19-SW10 – razor28 Sep 05 '14 at 09:05
  • 28
    Simply convert image to JPG format worked for me!! – Jayprakash Dubey Jan 05 '15 at 10:30
  • 2
    The very first image uploader I wrote myself could take any size jpeg, png, or gif, rotate it correctly, and output a jpeg of the desired compression level. Apparently I can make image uploaders and Apple can't. And unlike Apple I'd never dream of forcing my users to "oh, just strip alpha from the PNG manually! for every picture!". – Henrik Erlandsson Feb 27 '15 at 08:06
  • It's lame that xcode allows this when iTunes Connect does not. – James T Snell Oct 09 '16 at 23:51
  • [Try out with the simple steps here](https://stackoverflow.com/questions/26171739/remove-alpha-channel-in-an-image) – eranda.del Mar 29 '18 at 23:41
  • I get my screenshot from the simulator and it's giving this error. What a joke. – TPG Jul 16 '19 at 02:21
  • **A Simple Hack!!!** Convert You png to jpg format and good to go. [Convert Now][1] [1]: https://png2jpg.com/ – Soban Arshad May 28 '20 at 08:13

23 Answers23

516

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

Smikey
  • 8,106
  • 3
  • 46
  • 74
  • 50
    Its ridiculous that iTunes Connect won't accept screenshots generated by Xcode considering that's how they recommend you do it. – Joseph Toronto Nov 08 '14 at 21:09
  • For some inexplicable reason, when I do this it cuts the dimensions in half and is now "wrong size" for iTC! WTF Apple??? – mharper Dec 19 '14 at 23:53
  • 19
    It's understandable that with only $178B in cash on hand, Apple can't afford to fix this silly bug, and requires tens of thousands of developers to all tediously perform this operation themselves, over and over again. Ugh. – Nate Feb 05 '15 at 03:47
  • would that i can give this person 100 votes for solving my problem – Noor Apr 21 '15 at 17:15
  • 2
    double click photo "file" -> "Export..." – Arjay Waran Jun 28 '17 at 01:27
  • we have to use jpg, not png – DàChún Jan 10 '18 at 10:28
  • This is the right answer, but I had to click "Show options" at the bottom left of the file explorer to see the "Alpha" checkbox. Also, it inexplicably wouldn't work with multiple photos at a time. I had to do them one-by-one to remove the alpha. – Fernando Rojo Jan 26 '23 at 19:13
283

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.

brush51
  • 5,691
  • 6
  • 39
  • 73
  • 6
    JPEG is lossy, and it's a terrible, terrible idea. Check out other answers and properly remove transparency. – Rudolf Adamkovič Sep 16 '14 at 10:18
  • 37
    You can export to PNG without alpha in Preview. Simply open your image, choose export, select PNG, uncheck Alpha, and click Save. Preview also support batch export if you open all your images at once. – Russell Ladd Jan 07 '15 at 06:23
129

it's so easy...

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

Marek Manduch
  • 2,303
  • 1
  • 19
  • 22
93

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

bpolat
  • 3,879
  • 20
  • 26
81

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); 
Roman B.
  • 3,598
  • 1
  • 25
  • 21
36

You must remove alpha channels when uploading a photo to iTunes Connect.

You can do this by Preview, Photos App (old iPhoto), Pixelmator, Adobe Photoshop and GIMP.

Preview

  1. Open the photo in Preview (if the photo is in your photo album in Photos app (the old iPhoto), then simply drag it from the album to desktop. Then control-click (right-click when mouse) the duplicated photo and select Preview.app under Open With menu).

  2. Select Export… under File menu, and after selecting the destination, uncheck Alpha at the bottom, and click Export.

    File ==> Export...

    Alpha

Pixelmator

  1. Open the image in Pixelmator, without creating a new Pixelmator file. Just drag the photo to the Pixelmator window.

  2. From Share menu, click Export for Web…

    PM

  3. In the top bar, deselect Transparency.

  4. Click Next and then save the new file somewhere.

Finally, upload the new photo to iTunes Connect.

GIMP

  1. Open the photo in GIMP.

  2. Open the Layer menu.

  3. Under Transparency, click Remove Alpha Channel.

  4. Save the photo.

Adobe Photoshop

  1. Open the photo in Adobe Photoshop.

  2. Under Layer menu, click Layer Mask and then From Transparency.

  3. Delete the layer mask by right-clicking on the mask in the Layer panel and selecting Delete Layer Mask.

grg
  • 5,023
  • 3
  • 34
  • 50
Seyed Parsa Neshaei
  • 3,470
  • 18
  • 30
  • 1
    This will not work on Mac OS High Sierra, please try a lower version to export without alpha. Hope it helps someone. – Satheesh Dec 19 '17 at 10:37
11

If you are using Photoshop go File > Save for web (Command + Option + Shift + S). Make sure the Transparency is unchecked and this should work.

Hector Lopez
  • 313
  • 3
  • 12
  • Strange. This works for single image. But when I try to save actions and perform batch export - resulting images still have alpha. – kelin Aug 28 '17 at 22:29
10

Still a problem in 2019 :=)

This worked for me: Select all images you want to upload -> Right click -> Open in Preview -> Export -> Uncheck alpha -> Use the exported images.

Kristian
  • 2,071
  • 23
  • 15
9

Extending Roman B. answer. This is still a problem, I was uploading a cordova app. my solution using mogrify:

brew install imagemagick
* navigate to `platforms/ios/<your_app_name>/Images.xcassets/AppIcon.appiconset`*
mogrify -alpha off *.png

Then archived and validated successfully.

M. Junaid Salaat
  • 3,765
  • 1
  • 23
  • 25
5

On Pixelmator you can use 'Share > Export for Web...' ( + + E)

enter image description here

and deselect Transparency in the Tool Options Bar.

enter image description here

disco crazy
  • 31,313
  • 12
  • 80
  • 83
3

i have same problem just compress your png file on https://tinypng.com/ online and then try to upload that new compressed png file.

its work for me.

nizama bunti
  • 367
  • 1
  • 4
  • 18
3

You can remove the alpha channel from a PNG file from the command line with pngcrush, using the flag "-c 2":

$ file input.png
input.png: PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced
$ pngcrush -q -c 2 input.png output.png
libpng warning: iCCP: known incorrect sRGB profile
$ file output.png
output.png: PNG image data, 1024 x 1024, 8-bit/color RGB, non-interlaced

Note the change from RGBA to RGB: the Alpha channel is gone!

pngcrush lives at http://pmt.sourceforge.net/pngcrush/

codehead
  • 2,077
  • 16
  • 20
3

Faced same issue, Try using JPG format !! What worked for me here was using a jpg file instead of PNG as jpg files don't use alpha or transparency features. I did it via online image converter or you can also open the image in preview and then File->Export and uncheck alpha as option to save the image and use this image.

2

On Windows 10 you can use Paint 3D.

  1. Open the image
  2. Choose "Canvas" in the top menu
  3. De-select the "Transparent canvas" checkbox in the right panel
  4. Save
kjetilh
  • 4,821
  • 2
  • 18
  • 24
1

To get around the problem I batched converted using fireworks my png32 files to png24 for upload quick and easy. Jpeg works also but it is lossy.

Matthew
  • 161
  • 9
1

Faced same issue, Try using JPG format !!

Amit Ajmera
  • 1,387
  • 10
  • 15
1

Photoshop

  1. Slice it
  2. Save for web
  3. Uncheck Transparency
4b0
  • 21,981
  • 30
  • 95
  • 142
jcubero
  • 347
  • 2
  • 4
1

You can export to PNG without alpha in Preview. Simply open your image, choose export, select PNG, uncheck Alpha, and click Save. Preview also support batch export if you open all your images at once.

Usama Ali
  • 129
  • 1
  • 7
0

If you have imagemagick installed, then you can put the following alias into your .bash_profile. It will convert every png in a directory to a jpg, which automatically removes the alpha. You can use the resulting jpg files as your screen shots.

alias pngToJpg='for i in *.png; do convert $i ${i/.png/}.jpg; done'
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
0

What worked for me here was using a jpg file instead of PNG as jpg files don't use alpha or transparency features. I did it via online image converter or you can also open the image in preview and then File->Export and uncheck alpha as option to save the image and use this image.

Som
  • 122
  • 1
  • 1
  • 12
  • Yes, but you're asking for trouble using jpegs. They're inherently designed for 'noisy' images like photos, but lead to artifacting on images with a lot of block colours and straight edges like screenshots. – JamEngulfer Apr 14 '15 at 10:15
0

You can simply create a new Photoshop document and set its default background to White instead of Transparent. Then, copy and paste your image to the newly created document and save it.

user2298995
  • 2,045
  • 3
  • 19
  • 27
0

Exporting from Sketch

To avoid transparency, ensure no layer extends beyond the artboard bounds.

invisible squirrel
  • 2,968
  • 3
  • 25
  • 26
-2

Convert your PNG image to JPEG format.

kalpeshdeo
  • 1,236
  • 1
  • 11
  • 16
  • ITunes Connect won't accept jpeg for some things. IOS App icon must be png, for example. – eclux Oct 29 '17 at 06:02