GraphicsMagick: PNG: Use lower-case raw profile identifiers
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.40872.1673196900.1567.graphicsmagick-commit@lists.sourceforge.net> |
changeset 403c91fe1f53 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=403c91fe1f53 summary: PNG: Use lower-case raw profile identifiers diffstat: ChangeLog | 5 +++++ coders/png.c | 10 ++++++++-- www/Changelog.html | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diffs (64 lines): diff -r 8d887d58dff3 -r 403c91fe1f53 ChangeLog --- a/ChangeLog Sun Jan 08 09:13:11 2023 -0600 +++ b/ChangeLog Sun Jan 08 10:54:47 2023 -0600 @@ -1,5 +1,10 @@ 2023-01-08 Bob Friesenhahn <[email protected]> + * coders/png.c (WriteOnePNGImage): Use lower-case raw profile + identifiers (e.g. 'Raw profile type xmp') because exiftool expects + that. Partially addresses concerns raised by SourceForge bug #682 + "Invalid storage of XMP in PNGs". + * www/INSTALL-unix.rst: Add notes about required libjxl versions. * README.txt: Add notes about required libjxl versions. diff -r 8d887d58dff3 -r 403c91fe1f53 coders/png.c --- a/coders/png.c Sun Jan 08 09:13:11 2023 -0600 +++ b/coders/png.c Sun Jan 08 10:54:47 2023 -0600 @@ -1297,6 +1297,7 @@ else { strlcpy(profile_name,&text[ii].key[17],sizeof(profile_name)); + LocaleUpper(profile_name); strlcpy(profile_description,"generic profile, type ", sizeof(profile_description)); strlcat(profile_description,&text[ii].key[17], @@ -8194,17 +8195,22 @@ if (profile_iterator) { const char - *profile_name; + *profile_name_uc; const unsigned char *profile_info; + char + profile_name[MaxTextExtent]; + size_t profile_length; - while (NextImageProfile(profile_iterator,&profile_name,&profile_info, + while (NextImageProfile(profile_iterator,&profile_name_uc,&profile_info, &profile_length) != MagickFail) { + (void) strlcpy(profile_name, profile_name_uc, sizeof(profile_name)); + LocaleLower(profile_name); if (LocaleCompare(profile_name,"ICM") == 0) { #if defined(PNG_WRITE_iCCP_SUPPORTED) diff -r 8d887d58dff3 -r 403c91fe1f53 www/Changelog.html --- a/www/Changelog.html Sun Jan 08 09:13:11 2023 -0600 +++ b/www/Changelog.html Sun Jan 08 10:54:47 2023 -0600 @@ -40,6 +40,10 @@ <p>2023-01-08 Bob Friesenhahn <<a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p> <blockquote> <ul class="simple"> +<li><p>coders/png.c (WriteOnePNGImage): Use lower-case raw profile +identifiers (e.g. 'Raw profile type xmp') because exiftool expects +that. Partially addresses concerns raised by SourceForge bug #682 +"Invalid storage of XMP in PNGs".</p></li> <li><p>www/INSTALL-unix.rst: Add notes about required libjxl versions.</p></li> <li><p>README.txt: Add notes about required libjxl versions.</p></li> </ul>