From 815fc1e110a7adf7428a1cc46b9acd5827848d1c Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 27 Feb 2025 19:02:33 -0800 Subject: [PATCH] pngdec.c: add missing #ifdef for png_get_iCCP png_get_iCCP is an optional part of the API. Protect its usage with PNG_iCCP_SUPPORTED. Change-Id: I1ac777d1c2a200bb3e1303b3d095cc0d67633bd4 --- imageio/pngdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imageio/pngdec.c b/imageio/pngdec.c index cdd99883..f63cbebc 100644 --- a/imageio/pngdec.c +++ b/imageio/pngdec.c @@ -192,6 +192,7 @@ static int ExtractMetadataFromPNG(png_structp png, } } } +#ifdef PNG_iCCP_SUPPORTED // Look for an ICC profile. { png_charp name; @@ -208,6 +209,7 @@ static int ExtractMetadataFromPNG(png_structp png, if (!MetadataCopy((const char*)profile, len, &metadata->iccp)) return 0; } } +#endif // PNG_iCCP_SUPPORTED } return 1; }