Menu

#267 Transparency lost when converting from GIF to PNG

v1.0_(example)
closed-fixed
None
5
2014-08-23
2014-04-12
Jacob Page
No

When converting a transparent GIF to a PNG, the resulting PNG loses the transparency. This is only occurring when no resize is performed.

Command to reproduce:

gm convert Apple_transparent.gif -type Palette -colors 256 Test.PNG

The sample file is attached.

1 Attachments

Discussion

  • Glenn Randers-Pehrson

    Shouldn't you have used "-type PaletteMatte" instead of "-type Palette"? The type Palette is opaque.

    Hmm, I just tried that, and also simple
    "gm convert Apple_transparent.gif Test.PNG" and
    "gm convert Apple_transparent.gif -matte Test.PNG" and in all cases transparency was lost. So there's a bug here.

     

    Last edit: Glenn Randers-Pehrson 2014-07-20
  • Glenn Randers-Pehrson

    • assigned_to: Glenn Randers-Pehrson
     
  • Juraj Komacka

    Juraj Komacka - 2014-08-22

    seems like a regression to me "gm convert Apple_transparent.gif Test.PNG" (binary equal with outputs using -matte) produces different output for

    • gm 1.3.12 2010-03-08 Q8 with libpng 1.2.46 (Ubuntu 12.04) - Test_1.3.12.PNG (fine)
    • gm 1.3.16 2012-06-23 Q8 with libpng 1.2.49-1 (Debian Wheezy 7.1) - Test_1.3.16.PNG (wrong)
     

    Last edit: Juraj Komacka 2014-08-22
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-08-22

    I am able to reproduce this problem with 1.3.20.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-08-23

    The problem seems to be gone now. All of the GM tests are passing, including running under valgrind.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-08-23
    • status: open --> closed-fixed
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-08-23

    Closing as fixed.

     

Log in to post a comment.