Menu

#283 Some PNG files are incorrectly recolored

v1.0_(example)
closed-works-for-me
None
5
2014-11-18
2014-11-07
No

Hi,

after using the recolor function on some PNG (not all), output is incorrect - see attachments. I'm using matrix for recoloring to grayscale:

    [ 0.3, 0.59, 0.11,  0.0,  0.0],
    [ 0.3, 0.59, 0.11,  0.0,  0.0],
    [ 0.3, 0.59, 0.11,  0.0,  0.0],
    [ 0.0,  0.0,  0.0,  1.0,  0.0],
    [ 0.0,  0.0,  0.0,  0.0,  1.0]
2 Attachments

Discussion

  • Dominik Paľo

    Dominik Paľo - 2014-11-07

    I recolored same PNGs using ImageMagick and outputs are absolutely OK.

     
  • Glenn Randers-Pehrson

    What version of GM and libpng are you using?
    Type "gm convert | head -1" and "gm convert -list format | grep PNG" to find out.

     
  • Dominik Paľo

    Dominik Paľo - 2014-11-07

    GraphicsMagick 1.3.18 2013-03-10 Q8 http://www.GraphicsMagick.org/
    Portable Network Graphics (libpng 1.2.49,1.2.50, zlib 1.2.8)

    (I installed it from default Ubuntu repository using apt-get package manager)

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-11-07

    Please verify that the original.png retrieved from the SourceForge bug report is the same as what you uploaded. SourceForge's web site has a habit of re-writing uploaded PNG files. For example, it is 8-bit PNG now but perhaps it was 16-bit PNG before. If the file is not the same, perhaps it will work better if you change the extension to something like ".bin" or included it in a zip file.

    With the file currently attached to the bug report, this works ok for me with GraphicsMagick 1.3.20. Please note that a problem with reading 16-bit PNG files using a Q8 build was fixed in 1.3.19. The read problem produced output similar to your recolored.png example:

    gm convert original.png -recolor '0.3, 0.59, 0.11, 0.0, 0.0, 0.3, 0.59, 0.11, 0.0, 0.0, 0.3, 0.59, 0.11, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0' recolored.png
    

    Bob

     
  • Glenn Randers-Pehrson

    This may be a duplicate of bug #206

     
  • Glenn Randers-Pehrson

    • assigned_to: Glenn Randers-Pehrson
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-11-18

    We did not get any response regarding verifying that original.png was not modified. I am assuming that the problem encountered was already fixed in 1.3.19.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-11-18
    • status: open --> closed-works-for-me
    • assigned_to: Glenn Randers-Pehrson --> Bob Friesenhahn
     

Log in to post a comment.

MongoDB Logo MongoDB