[FFmpeg-trac] #831(avcodec:closed): gif: 1bpp with transparency decodes to black screen

FFmpeg trac at avcodec.org
Mon Dec 26 01:45:32 CET 2011


#831: gif: 1bpp with transparency decodes to black screen
------------------------------------+-----------------------------------
             Reporter:  ami_stuff   |                    Owner:
                 Type:  defect      |                   Status:  closed
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:  invalid
             Keywords:  bmp alpha   |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Changes (by cehoyos):

 * keywords:   => bmp alpha
 * resolution:   => invalid
 * status:  new => closed
 * component:  undetermined => avcodec
 * version:  unspecified => git-master


Comment:

 The sample has a two-colour palette: Solid black and transparent black.
 It is transcoded correctly with
 ffmpeg -i 1bpp_transparent_white.gif out.png
 ffmpeg -i 1bpp_transparent_white.gif -pix_fmt bgra out.png
 ffmpeg -i 1bpp_transparent_white.gif -f image2 out.gif

 I will attach a patch that allows to do the following:
 ffmpeg -i 1bpp_transparent_white.gif out.bmp
 ffmpeg -i out.bmp out.png
 and get the same (semi-transparent) png as above.

 But since neither ImageMagick nor GIMP show out.bmp (with the patch) as
 semi-transparent, I am not sure if any application supports transparency
 in the bmp palette (and the Microsoft documentation repeatedly states the
 relevant value "must be zero" making a bug in FFmpeg's bmp palette reading
 code likely).
 Otoh, it is possible that for ImageMagick and GIMP, this depends on the
 BITMAPHEADER version, so please reopen if you find a palletized bmp that
 shows transparency with any application.

-- 
Ticket URL: <http://www.avcodec.org/trac/ffmpeg/ticket/831#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list