[FFmpeg-trac] #4816(undetermined:new): png: wrong alpha detection

FFmpeg trac at avcodec.org
Mon Aug 31 16:42:52 CEST 2015


#4816: png: wrong alpha detection
-------------------------------------+-------------------------------------
             Reporter:  pszemus      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: alpha channel isn't detected, thus it's being lost
 after conversion.
 How to reproduce:
 {{{
 $ ~/ffmpeg/ffmpeg -i
 http://storage2.sportowefakty.pl.sds.o2.pl/tags/55c99e750a5fd6_50314226.png
 ffmpeg version N-74416-gacbd78a Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
   configuration: --prefix=/home/pszemus/ffmpeg/build --enable-pic
 --enable-pthreads --enable-libmp3lame --enable-version3 --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-gpl
 --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libx264
 --pkg-config-flags=--static --enable-protocol=https --enable-openssl
 --extra-cflags=-I/opt/WP/common.libs/inc --extra-
 ldflags='-L/opt/WP/common.libs/lib -ldl'
   libavutil      54. 30.100 / 54. 30.100
   libavcodec     56. 57.100 / 56. 57.100
   libavformat    56. 40.101 / 56. 40.101
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 33.100 /  5. 33.100
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.101 /  1.  2.101
   libpostproc    53.  3.100 / 53.  3.100
 Input #0, png_pipe, from
 'http://storage2.sportowefakty.pl.sds.o2.pl/tags/55c99e750a5fd6_50314226.png':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: png, rgb24(pc), 330x330, 25 tbr, 25 tbn, 25 tbc
 At least one output file must be specified
 }}}

 FFmpeg detects pixel format as `rgb24(pc)` ignoring the alpha channel.
 GraphicsMagick, on the other hand, displays information about 4 channels:
 {{{
 $ gm identify -verbose
 http://storage2.sportowefakty.pl.sds.o2.pl/tags/55c99e750a5fd6_50314226.png
 Image: /tmp/gmIhmThX
   Format: PNG (Portable Network Graphics)
   Geometry: 330x330
   Class: DirectClass
   Type: true color with transparency
   Depth: 8 bits-per-pixel component
   Channel Depths:
     Red:      8 bits
     Green:    8 bits
     Blue:     8 bits
     Opacity:  1 bits
   Channel Statistics:
     Red:
       Minimum:                     0.00 (0.0000)
       Maximum:                   255.00 (1.0000)
       Mean:                       36.07 (0.1414)
       Standard Deviation:         85.97 (0.3371)
     Green:
       Minimum:                     0.00 (0.0000)
       Maximum:                   255.00 (1.0000)
       Mean:                       41.85 (0.1641)
       Standard Deviation:         83.66 (0.3281)
     Blue:
       Minimum:                     0.00 (0.0000)
       Maximum:                   255.00 (1.0000)
       Mean:                       19.49 (0.0764)
       Standard Deviation:         56.10 (0.2200)
     Opacity:
       Minimum:                     0.00 (0.0000)
       Maximum:                   255.00 (1.0000)
       Mean:                      194.13 (0.7613)
       Standard Deviation:        108.70 (0.4263)
   Opacity: (  0,  0,  0,255)      #000000FF
   Filesize: 43.3Ki
   Interlace: No
   Orientation: Unknown
   Background Color: white
   Border Color: #DFDFDF00
   Matte Color: #BDBDBD00
   Page geometry: 330x330+0+0
   Compose: Over
   Dispose: Undefined
   Iterations: 0
   Compression: Zip
   Png:IHDR.color-type-orig: 2
   Png:IHDR.bit-depth-orig: 8
   Signature:
 690a475a4154c72e21cb56c6864e8b37780716ddc7d028661724d29ae6e7f7ac
   Tainted: False
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4816>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list