AS Problem Solving Series 3—iCCP: Not recognizing known sRGB profile

AS Problem Solving Series 3—iCCP: Not recognizing known sRGB profile

 

http://my.oschina.net/1pei/blog/479162

4.6 Problem solving

     After clarifying the version strictly checked by linpng and the content of the check, how to solve this problem.

4.6.1 Solution 1: Delete iCCP profile sRGB embedded in png image

    There are some answers in [13, 16, 17] suggesting to "convert" or "mogrify" the image with tools like Image Magick/mogrify/GIMP/exiftool to remove the iCCP profile sRGB embedded in the png image:

   Example of using Image Magick:

       Delete profile in a single png file:   % convert -strip <input filename> <output filename>

       Batch delete profile sRGB in all png files :

           set fn=E:\Program Files\ImageMagick-6.9.0-Q16\convert.exe

           for /f "tokens=*" %%i in ('dir/s/b *.png') do "%fn%" "%%i" -strip "%%i"

   Examples of mogrify usage:

 

       Remove profile sRGB within a single png file:   mogrify +profile sRGB <png file>

      Batch delete profile sRGB in all png files :

             find <path to res folder> -name *.png -exec mogrify +profile sRGB {}  \;

    Example of using GIMP:

       To delete the embedded profile, go to Image > Mode > Assign Color Profile and set it to RGB workspace (sRGB built-in), then File > Overwrite add_green.png to overwrite the original png file.

       To modify the embedded profile, go to Image > Mode > Convert to Color Profile and select a profile.

 

   Also mentioned in [17]: libpng 1.6+ stricter checks will alert the original HP/MS sRGB profile. The old profile used D50 whitepoint, and D65 was the standard. This profile is used by Adobe Photoshop, although it is not embedded in png images by default. The easiest way to do this is to remove the inline profile from the image, but this can result in slightly off-color colors (when there is a color correction system). But if color deviation is not desired (eg for print output), a different color profile can be embedded.

   In [13], some netizens also pointed out that deleting the iCCP profile sRGB in the png image in this way will lose information such as how to render the image, and the colors in the png may be changed.

4.6.2 解决方案2:  将aRGB转换为sRGB

   [14]中有网友提到:这个图片是sRGB的改成ARGB(Adobe RGB)的就可以啦,在Android  Studio中的右上角会显示24位而ARGB的图片显示是32位,但我本地报这种警告的png图片除了有32位以外还有24位的,因此这个方案不太可行。

 

  综合上面的意见,[17]中给出的结论比较令人信服,利用GIMP工具删除内嵌的profile后问题解决。

 

 

mipmap 目录和drawable 目录有什么区别

我简单总结一下:

使用上没有任何区别,你把它当drawable用就好了。

但是用mipmap系统会在缩放上提供一定的性能优化。

但是 放入mipMap 的图片 如果出现 

iCCP: Not recognizing known sRGB profile

布局文件里面,图片ID会找不到, 

因此 使用PhotoShop 生成PNG图片的时候 要注意

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327062144&siteId=291194637