iOS应用发布时上传App icon时出现错误(image can't contain alpha channels or transparencies)
2015-12-31 20:03
561 查看
今天发布iOS app到AppStore时,上传App icon,网页提示错误(image can't contain alpha channels or transparencies),网上查了一下,发现Apple官方对App icon上传设置了新的规定,以前都是上传PNG图片就OK了。现在需要将PNG图片用预览打开导出一下生成JPEG格式的图片,然后再上传就可以了。
还有其他解决办法,如下:
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.
I've found you can also just re-export the png's in Preview, but uncheck the Alpha checkbox when saving.
For this i made a new simple tool. You can remove alpha channel (transparency) of multiple .png files within seconds.
You can download from here http://alphachannelremover.blogspot.com
Use
to remove alpha channel.
Update from May 3
You can tell whether image contains alpha channel by running:
In case you render screenshots in iOS Simulator you can drop alpha channel by passing
If you are using Photoshop go File > Save for web (Command + Option + Shift + S). Make sure the Transparency is unchecked and this should work.
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.
i was able to use imageoptim to remove alpha channel and compress png files.
You can remove the alpha channel from a PNG file from the command line with pngcrush, using the flag "-c 2":
Note the change from RGBA to RGB: the Alpha channel is gone!
pngcrush lives at http://pmt.sourceforge.net/pngcrush/
On Pixelmator you can use 'Share > Export for Web...' (⇧ + ⌘ + E)
and deselect Transparency in the Tool Options Bar.
You must remove alpha channels when uploading a photo.
You can do this by Preview, Photos App (old iPhoto), Pixelmatr or even Adobe Photoshop. I will explain it in Preview.
First, open a 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.
Second, Select Export... under File menu, and after selecting the destination, uncheck Alpha at the bottom, and export.
Finally, upload the new photo to iTunes Connect.
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.
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.
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.
Convert your PNG image to JPEG format.
还有其他解决办法,如下:
Solution 1
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.
Solution 2
I've found you can also just re-export the png's in Preview, but uncheck the Alpha checkbox when saving.
Solution 3
For this i made a new simple tool. You can remove alpha channel (transparency) of multiple .png files within seconds.You can download from here http://alphachannelremover.blogspot.com
Solution 4
Use mogrifytool from
ImageMagickpackage
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 = YESto
UIGraphicsBeginImageContextWithOptions:
UIGraphicsBeginImageContextWithOptions(imageSize, YES, 0);
Solution 5
If you are using Photoshop go File > Save for web (Command + Option + Shift + S). Make sure the Transparency is unchecked and this should work.
Solution 6
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.
Solution 7
i was able to use imageoptim to remove alpha channel and compress png files.
Solution 8
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/
Solution 9
On Pixelmator you can use 'Share > Export for Web...' (⇧ + ⌘ + E)and deselect Transparency in the Tool Options Bar.
Solution 10
You must remove alpha channels when uploading a photo.You can do this by Preview, Photos App (old iPhoto), Pixelmatr or even Adobe Photoshop. I will explain it in Preview.
First, open a 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.
Second, Select Export... under File menu, and after selecting the destination, uncheck Alpha at the bottom, and export.
Finally, upload the new photo to iTunes Connect.
Solution 11
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.
Solution 12
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'
Solution 13
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 imageand use this image.
Solution 14
Convert your PNG image to JPEG format.
相关文章推荐
- 【Objective-C学习记录】第二十九天
- 使用iostat命令确认磁盘IO很差
- iOS Masonry Key debugging 调试详解
- NSObject + NSCoding Category
- Android 如何解决dialog弹出时无法捕捉Activity的back事件
- Android打造listview万能适配器(上)
- ios使用常用正则表达式验证手机号
- android Audio 详解( 二 )
- sc7731 Android 5.1 LCD驱动简明笔记之一
- android Audio 详解( 一 )
- iOS小技巧16-iOS/iPhone/Mac OS X版本历史
- Android实现emoji
- Java&Android中的回调机制
- android hint 自动消失 .
- android Graphics:区域(Range)
- 【Android布局】在程序中设置android:gravity 和 android:layout_Gravity属性
- iOS字体清单
- Android 版本及别名
- iOS: SegmentControl 实现页面切换的四种方法
- [Android]使用Dagger 2依赖注入 - API(翻译)