[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphicsmagick-help
Subject:    Re: [GM-help] Identifying palette PNG
From:       Bob Friesenhahn <bfriesen () simple ! dallas ! tx ! us>
Date:       2019-07-02 13:30:55
Message-ID: alpine.GSO.2.20.1907020817440.17027 () scrappy ! simplesystems ! org
[Download RAW message or body]

On Tue, 2 Jul 2019, Przemysław Sobala wrote:

> *Png:IHDR.color-type-orig: 3*
>   Png:IHDR.bit-depth-orig: 8
>   Signature: 7c31b2b0734aea24f798f0ac94b13f96dbe7e1dca3030c2f4e2f8472763ced92
>   Tainted: False
>   User Time: 0.050u
>   Elapsed Time: 0m:0.012858s
>   Pixels Per Second: 16.8Mi
>
> The *Type*property is set to *true color* and it turns out that the only way 
> to know if input PNG file is a palette one is via reading 
> Png:IHDR.color-type-origproperty (value 3 means "Each pixel is a palette 
> index").

Unfortunately, the image type reported reflects how the image is 
represented in memory after is has been read.  In some cases there is 
no way to represent the input file other than as a 
truecolor/directclass image.  In other cases there may be a bug and 
the image is mis-marked or wrongly losing a useful original 
representation.  If the type reported by 'gm identify' or 'gm +ping 
identify' is not identical, then there may be a bug, or it might be 
necessary to read the whole image data (requested by +ping) to know 
the correct answer.  It is intended that 'gm identify' should be quick 
and try not to read the whole file content if the file header provides 
essential summary information.

Look for a program called 'pngcheck'.  This program has a verbose mode 
which reports on the PNG chunks.  You can also add '-debug coder' to 
the GraphicsMagick command line to see the chunks as they are 
encountered and the decisions being made.

GraphicsMagick is open-source free software so anyone can enhance it 
an contribute improvements to the project.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic