Re: PNG Metadata

Bob Friesenhahn <[email protected]> Thu, 26 Aug 2021 08:00:28 -0500 (CDT)
Newsgroups gmane.comp.graphics.png.devel
Message-ID <[email protected]>
On Thu, 26 Aug 2021, user1138--- via png-mng-implement wrote:

> It was suggested to me here <https://github.com/ImageMagick/ImageMagick/discussions/4114> that I contact the libpng devs regarding an issue I'm having with PNG metadata.
>
> To summarise, I am using ImageMagick to resize png's (e.g. convert meta-test.png -resize 100x100 new.png), and I would like for the resized image to retain the metadata of the original (exif, iptc, xmp) however all metadata is always stripped from the resized image.
>
> It was suggested this may be the behavior of libpng, so:
> 1. Is it the case that libpng strips all metadata from generated png images? &
> 2. Can this behavior be changed/set to retain the metadata of the new/resized image?

This issue is related to ImageMagick and not libpng.  The reason is 
that when a PNG is written, the metadata needs to be provided while 
writing it.  Libpng is not stripping anything.

The possible cause could be inability of ImageMagick to write the 
metadata in PNG, or because the operation you supplied modified 
parameters which are redundant with image properties, but the 
capability does not exist within ImageMagick to update the metadata 
properly to reflect the changes.  It is likely decided to not output 
metadata which is now incorrect or misleading.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt