From d3a1d4df1b5bf22b193280ad4e6cbca6c390a98d Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 28 Sep 2022 16:28:44 +0100 Subject: [PATCH] spngsave: name ICC profiles (#3068) The PNG spec requires that the iCCP chunk has a profile name with a minumum length of 1 (we use the same "icc" name as pngsave). --- ChangeLog | 1 + libvips/foreign/spngsave.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 821ff973..7ac2f01b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ - reduce latency on dzsave kill [kleisauke] - improve text too large check [kleisauke] - fix subifd writing for small images [ruven] +- name ICC profiles in spngsave [lovell] 24/7/22 started 8.13.1 - fix im7 feature detection in meson diff --git a/libvips/foreign/spngsave.c b/libvips/foreign/spngsave.c index a40be6e4..445bb3cf 100644 --- a/libvips/foreign/spngsave.c +++ b/libvips/foreign/spngsave.c @@ -217,7 +217,7 @@ vips_foreign_save_spng_metadata( VipsForeignSaveSpng *spng, VipsImage *in ) "of ICC profile\n", length ); #endif /*DEBUG*/ - vips_strncpy( iccp.profile_name, "", + vips_strncpy( iccp.profile_name, "icc", sizeof( iccp.profile_name ) ); iccp.profile_len = length; iccp.profile = (void *) data;