View Issue Details

IDProjectCategoryView StatusLast Update
0000097fileGeneralpublic2019-08-10 22:33
Reporterjidanni Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
PlatformDebianOSLinux 
Product Version5.37 
Summary0000097: File misses the alpha channel sometimes
DescriptionFile misses the alpha channel in the second file!

$ set slope.png zaokeng_slope.png
$ identify -format '%[channels]\n' $@
srgba
srgba
$ file $@
slope.png: PNG image data, 640 x 220, 8-bit/color RGBA, non-interlaced
zaokeng_slope.png: PNG image data, 700 x 400, 8-bit/color RGB, non-interlaced
TagsNo tags attached.

Activities

jidanni

2019-08-06 14:41

reporter  

zaokeng_slope.png (16,283 bytes)   
zaokeng_slope.png (16,283 bytes)   
slope.png (17,410 bytes)   
slope.png (17,410 bytes)   

christos

2019-08-10 13:27

manager   ~0003283

Last edited: 2019-08-10 13:28

Well, "identify" is right and wrong. The second file is not rgba, it is rgb with extra transparency information in a "tRNS" chunk. Effectively this means that both files contain alpha info, but they are encoded differently. file(1) only looks at the IHDR section and does not do further processing to see if there are any other chunks. While we can make file(1) smarter about png files by parsing more of the png-file and all the additional chunks, and print additional information about it, it hardly seems worth-while. For reference: https://en.wikipedia.org/wiki/Portable_Network_Graphics

jidanni

2019-08-10 22:33

reporter   ~0003284

(I was trying to scan for all files that would trigger https://bugs.chromium.org/p/chromium/issues/detail?id=991197 .)
(OK, as you understand the issue perhaps you should file an Imagemagick bug.)

Issue History

Date Modified Username Field Change
2019-08-06 14:41 jidanni New Issue
2019-08-06 14:41 jidanni File Added: zaokeng_slope.png
2019-08-06 14:41 jidanni File Added: slope.png
2019-08-10 13:23 christos Assigned To => christos
2019-08-10 13:23 christos Status new => assigned
2019-08-10 13:27 christos Status assigned => feedback
2019-08-10 13:27 christos Note Added: 0003283
2019-08-10 13:28 christos Note Edited: 0003283
2019-08-10 22:33 jidanni Note Added: 0003284
2019-08-10 22:33 jidanni Status feedback => assigned