From 319860e919d5fcce13a3bebe77dcff88abbc78d5 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 27 Feb 2025 19:09:28 -0800 Subject: [PATCH] pngdec.c: support ImageMagick app1 exif text data Test file created with ImageMagick 6.9.13-12: ``` convert test_exif.png test_app1_exif.png ``` Bug: webp:398066379 Change-Id: I10a20de5699fabb0906045994d7d1f4b9e951973 --- imageio/pngdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imageio/pngdec.c b/imageio/pngdec.c index f63cbebc..8dc3c6c7 100644 --- a/imageio/pngdec.c +++ b/imageio/pngdec.c @@ -139,6 +139,8 @@ static const struct { { "Raw profile type xmp", ProcessRawProfile, METADATA_OFFSET(xmp) }, // Exiftool puts exif data in APP1 chunk, too. { "Raw profile type APP1", ProcessRawProfile, METADATA_OFFSET(exif) }, + // ImageMagick uses lowercase app1. + { "Raw profile type app1", ProcessRawProfile, METADATA_OFFSET(exif) }, // XMP Specification Part 3, Section 3 #PNG { "XML:com.adobe.xmp", MetadataCopy, METADATA_OFFSET(xmp) }, { NULL, NULL, 0 },