GraphicsMagick: 3 new changesets
GraphicsMagick Commits <[email protected]> Sat, 20 Apr 2024 09:45:28 -0500
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.14832.1713624341.7900.graphicsmagick-commit@lists.sourceforge.net> |
changeset 199e8dcb16ba in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=199e8dcb16ba summary: magick/describe.c: Reveal opacity presence. changeset e20721ebd0ae in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=e20721ebd0ae summary: coders/tga.c: TODO: We should decide whether opacity could be packed into palette or the full alpha channel is needed. changeset 5d3f35e77f30 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=5d3f35e77f30 summary: WebP: Add support for '-define webp:exact=true' diffstat: ChangeLog | 17 +++ VisualMagick/installer/inc/version.isx | 4 +- coders/png.c | 4 + coders/tga.c | 5 +- coders/webp.c | 17 +++- doc/options.imdoc | 32 ++++++- magick/describe.c | 2 + magick/version.h | 4 +- utilities/gm.1 | 77 +++++++++++++-- www/ChangeLog.html | 20 ++++ www/GraphicsMagick.html | 28 +++++- www/animate.html | 13 ++- www/compare.html | 13 ++- www/composite.html | 13 ++- www/conjure.html | 13 ++- www/convert.html | 13 ++- www/display.html | 13 ++- www/gm.html | 158 ++++++++++++++++++++++++++++++-- www/identify.html | 13 ++- www/import.html | 13 ++- www/mogrify.html | 13 ++- www/montage.html | 13 ++- 22 files changed, 447 insertions(+), 51 deletions(-) diffs (truncated from 935 to 500 lines): diff -r d613dd1c2ce9 -r 5d3f35e77f30 ChangeLog --- a/ChangeLog Thu Apr 11 16:38:16 2024 -0500 +++ b/ChangeLog Sat Apr 20 09:44:02 2024 -0500 @@ -1,3 +1,20 @@ +2024-04-20 Bob Friesenhahn <[email protected]> + + * doc/options.imdoc: Update the documentation regarding WebP exact + mode, and the new --version option. + + * coders/webp.c (WriteWEBPImage): Add support for '-define + webp:exact=true' to preserve exact RGB values under transparent + areas while writing WebP format. Enable this automatically when + lossless is enabled. If lossless is enabled, this option may be + used to disable exact mode. Addresses SourceForge issue #737 + "WebP: Colors not preserved in fully-transparent areas". + +2024-04-12 Fojtik Jaroslav <[email protected]> + + * coders/png.c: + * magick/describe.c: Reveal opacity presence. + 2024-04-11 Fojtik Jaroslav <[email protected]> * coders/tga.c: Write correctly TGA with opacity values in palette. diff -r d613dd1c2ce9 -r 5d3f35e77f30 VisualMagick/installer/inc/version.isx --- a/VisualMagick/installer/inc/version.isx Thu Apr 11 16:38:16 2024 -0500 +++ b/VisualMagick/installer/inc/version.isx Sat Apr 20 09:44:02 2024 -0500 @@ -10,5 +10,5 @@ #define public MagickPackageName "GraphicsMagick" #define public MagickPackageVersion "1.4" -#define public MagickPackageVersionAddendum ".020240411" -#define public MagickPackageReleaseDate "snapshot-20240411" +#define public MagickPackageVersionAddendum ".020240420" +#define public MagickPackageReleaseDate "snapshot-20240420" diff -r d613dd1c2ce9 -r 5d3f35e77f30 coders/png.c --- a/coders/png.c Thu Apr 11 16:38:16 2024 -0500 +++ b/coders/png.c Sat Apr 20 09:44:02 2024 -0500 @@ -2366,6 +2366,10 @@ mng_info->scenes_found > (long) (image_info->first_scene+ image_info->number_scenes)))) { + image->matte=((ping_colortype == PNG_COLOR_TYPE_RGB_ALPHA) || + (ping_colortype == PNG_COLOR_TYPE_GRAY_ALPHA) || + (png_get_valid(ping, ping_info, PNG_INFO_tRNS))); + /* This happens later in non-ping decodes */ if (png_get_valid(ping,ping_info,PNG_INFO_tRNS)) image->storage_class=DirectClass; diff -r d613dd1c2ce9 -r 5d3f35e77f30 coders/tga.c --- a/coders/tga.c Thu Apr 11 16:38:16 2024 -0500 +++ b/coders/tga.c Sat Apr 20 09:44:02 2024 -0500 @@ -1123,8 +1123,9 @@ */ if (((write_grayscale == MagickFalse) && (image->storage_class == PseudoClass) && - (image->colors > 256))) - { + (image->colors > 256)) || (image->matte == MagickTrue)) + { /* TODO: We should decide whether opacity could be packed into palette or + the full alpha channel is needed. */ /* (void) SyncImage(image); */ image->storage_class=DirectClass; } diff -r d613dd1c2ce9 -r 5d3f35e77f30 coders/webp.c --- a/coders/webp.c Thu Apr 11 16:38:16 2024 -0500 +++ b/coders/webp.c Sat Apr 20 09:44:02 2024 -0500 @@ -102,6 +102,7 @@ #endif #if WEBP_ENCODER_ABI_VERSION >= 0x0209 /* >= 0.5.0 */ # define SUPPORT_WEBP_MUX +# define SUPPORT_WEBP_EXACT #include <webp/mux.h> #endif #if WEBP_ENCODER_ABI_VERSION >= 0x020e /* >= 0.6.0 */ @@ -676,7 +677,13 @@ configure.quality = (float) image_info->quality; if ((value=AccessDefinition(image_info,"webp","lossless"))) - configure.lossless=(LocaleCompare(value,"TRUE") == 0 ? 1 : 0); + { + configure.lossless=(LocaleCompare(value,"TRUE") == 0 ? 1 : 0); +#if defined(SUPPORT_WEBP_EXACT) + /* Preserve RGB channels in 100% transparent areas */ + configure.exact=1; +#endif + } if ((value=AccessDefinition(image_info,"webp","method"))) configure.method=MagickAtoI(value); if ((value=AccessDefinition(image_info,"webp","image-hint"))) @@ -740,6 +747,13 @@ if ((value=AccessDefinition(image_info,"webp","use-sharp-yuv"))) configure.use_sharp_yuv=(LocaleCompare(value,"TRUE") == 0 ? 1 : 0); #endif +#if defined(SUPPORT_WEBP_EXACT) + if ((value=AccessDefinition(image_info,"webp","exact"))) + { + /* Preserve RGB channels in 100% transparent areas */ + configure.exact=(LocaleCompare(value,"TRUE") == 0 ? 1 : 0); + } +#endif if (WebPValidateConfig(&configure) != 1) ThrowWriterException(CoderError,WebPInvalidConfiguration,image); @@ -767,7 +781,6 @@ p++; } } - } else { diff -r d613dd1c2ce9 -r 5d3f35e77f30 doc/options.imdoc --- a/doc/options.imdoc Thu Apr 11 16:38:16 2024 -0500 +++ b/doc/options.imdoc Sat Apr 20 09:44:02 2024 -0500 @@ -1514,8 +1514,12 @@ 'quality' has a useful range of 10-184 if used for this purpose. </dd> +<dt>webp:exact={true|false}</dt> +<dd>Preserve exact RGB values under transparent areas. Default false. +</dd> + <dt>webp:lossless={true|false}</dt> -<dd>Enable lossless encoding. +<dd>Enable lossless encoding. Also enables 'exact' mode. </dd> <dt>webp:method={0-6}</dt> @@ -6022,10 +6026,32 @@ <!-- ------------ -version ------------------------------------------ --> -<utils apps=animate,compare,composite,conjure,convert,display,identify,import,mogrify,montage> +<utils apps=animate,batch,compare,composite,conjure,convert,display,gm,identify,import,mogrify,montage> <dopt>-version</opt> -<abs>print GraphicsMagick version string</abs> +<abs>print detailed GraphicsMagick version/build information</abs> + +<pp> +Reports the release version, maximum sample-depth, web-site URL, +copyright notice, feature support, and the options used while building +the software. This is the same output as produced by the 'version' +sub-command.</pp> + +</utils> + + + + +<!-- ------------ --version ------------------------------------------ --> + +<utils apps=animate,batch,compare,composite,conjure,convert,display,gm,identify,import,mogrify,montage> +<dopt>-version</opt> + +<abs>print compact GNU-style GraphicsMagick version information</abs> + +<pp> +Reports the release version, maximum sample-depth, web-site URL, and +copyright notice.</pp> </utils> diff -r d613dd1c2ce9 -r 5d3f35e77f30 magick/describe.c --- a/magick/describe.c Thu Apr 11 16:38:16 2024 -0500 +++ b/magick/describe.c Sat Apr 20 09:44:02 2024 -0500 @@ -159,6 +159,8 @@ image->error.normalized_mean_error, image->error.normalized_maximum_error); } + if(image->matte==MagickTrue) + (void) fputs("+opacity ",file); (void) fprintf(file,"%u-bit ",image->depth); if (GetBlobSize(image) != 0) { diff -r d613dd1c2ce9 -r 5d3f35e77f30 magick/version.h --- a/magick/version.h Thu Apr 11 16:38:16 2024 -0500 +++ b/magick/version.h Sat Apr 20 09:44:02 2024 -0500 @@ -38,8 +38,8 @@ #define MagickLibVersion 0x282500 #define MagickLibVersionText "1.4" #define MagickLibVersionNumber 28,25,0 -#define MagickChangeDate "20240411" -#define MagickReleaseDate "snapshot-20240411" +#define MagickChangeDate "20240420" +#define MagickReleaseDate "snapshot-20240420" /* The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines diff -r d613dd1c2ce9 -r 5d3f35e77f30 utilities/gm.1 --- a/utilities/gm.1 Thu Apr 11 16:38:16 2024 -0500 +++ b/utilities/gm.1 Sat Apr 20 09:44:02 2024 -0500 @@ -1,4 +1,4 @@ -.TH gm 1 "2024/02/11" "GraphicsMagick" +.TH gm 1 "2024/04/20" "GraphicsMagick" .TP .in 15 .in 15 @@ -1163,7 +1163,7 @@ Resource, TemporaryFile, Transform, -User. +User, Warning, or X11, For example, to log cache and blob events, use @@ -1788,11 +1788,19 @@ .in 15 .in 15 +.B "webp:exact={true|false}" +.in 20 + \fR +.in 20 +Preserve exact RGB values under transparent areas. Default false. + +.in 15 +.in 15 .B "webp:lossless={true|false}" .in 20 \fR .in 20 -Enable lossless encoding. +Enable lossless encoding. Also enables 'exact' mode. .in 15 .in 15 @@ -4878,7 +4886,18 @@ for a description of these values. .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information + +Reports the release version, maximum sample-depth, web-site URL, +copyright notice, feature support, and the options used while building +the software. This is the same output as produced by the 'version' +sub-command. +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information + +Reports the release version, maximum sample-depth, web-site URL, and +copyright notice. .TP .B "-view \fI<string>"\fP \fRFlashPix viewing parameters @@ -5481,7 +5500,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .TP .B "-visual \fI<type>"\fP \fRanimate images using this X visual type @@ -6054,7 +6076,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information For a more detailed description of each option, see Options, above. @@ -6298,7 +6323,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .TP .B "-watermark \fI<brightness>x<saturation>"\fP \fRpercent brightness and saturation of a watermark @@ -6396,7 +6424,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .SH MAGICK SCRIPTING LANGUAGE The Magick Scripting Language (MSL) presently defines the following @@ -7452,7 +7483,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .TP .B "-view \fI<string>"\fP \fRFlashPix viewing parameters @@ -7848,7 +7882,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .TP .B "-visual \fI<type>"\fP \fRanimate images using this X visual type @@ -9767,7 +9804,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information For a more detailed description of each option, see Options, above. @@ -9965,7 +10005,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information For a more detailed description of each option, see Options, above. @@ -10423,7 +10466,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .TP .B "-view \fI<string>"\fP \fRFlashPix viewing parameters @@ -10776,7 +10822,10 @@ \fRprint detailed information about the image .TP .B "-version" -\fRprint GraphicsMagick version string +\fRprint detailed GraphicsMagick version/build information +.TP +.B "-version" +\fRprint compact GNU-style GraphicsMagick version information .TP .B "-white-point \fI<x>,<y>"\fP \fRchromaticity white point diff -r d613dd1c2ce9 -r 5d3f35e77f30 www/ChangeLog.html --- a/www/ChangeLog.html Thu Apr 11 16:38:16 2024 -0500 +++ b/www/ChangeLog.html Sat Apr 20 09:44:02 2024 -0500 @@ -38,6 +38,26 @@ <div class="document" id="graphicsmagick-changelog"> <h1 class="title">GraphicsMagick ChangeLog</h1> +<p>2024-04-20 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>doc/options.imdoc: Update the documentation regarding WebP exact +mode, and the new --version option.</p></li> +<li><p>coders/webp.c (WriteWEBPImage): Add support for '-define +webp:exact=true' to preserve exact RGB values under transparent +areas while writing WebP format. Enable this automatically when +lossless is enabled. If lossless is enabled, this option may be +used to disable exact mode. Addresses SourceForge issue #737 +"WebP: Colors not preserved in fully-transparent areas".</p></li> +</ul> +</blockquote> +<p>2024-04-12 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40yandex.com">JaFojtik<span>@</span>yandex<span>.</span>com</a>></p> +<blockquote> +<ul class="simple"> +<li><p>coders/png.c:</p></li> +<li><p>magick/describe.c: Reveal opacity presence.</p></li> +</ul> +</blockquote> <p>2024-04-11 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40yandex.com">JaFojtik<span>@</span>yandex<span>.</span>com</a>></p> <blockquote> <ul class="simple"> diff -r d613dd1c2ce9 -r 5d3f35e77f30 www/GraphicsMagick.html --- a/www/GraphicsMagick.html Thu Apr 11 16:38:16 2024 -0500 +++ b/www/GraphicsMagick.html Sat Apr 20 09:44:02 2024 -0500 @@ -1433,7 +1433,7 @@ <tt>Resource</tt>, <tt>TemporaryFile</tt>, <tt>Transform</tt>, -<tt>User</tt>. +<tt>User</tt>, <tt>Warning</tt>, or <tt>X11</tt>, For example, to log cache and blob events, use</font></td></tr></table> @@ -1830,8 +1830,11 @@ quality setting of 75 is translated to a compress level of 9 such that 'quality' has a useful range of 10-184 if used for this purpose. </dd> +<dt>webp:exact={true|false}</dt> +<dd>Preserve exact RGB values under transparent areas. Default false. +</dd> <dt>webp:lossless={true|false}</dt> -<dd>Enable lossless encoding. +<dd>Enable lossless encoding. Also enables 'exact' mode. </dd> <dt>webp:method={0-6}</dt> <dd>Quality/speed trade-off. @@ -5792,7 +5795,26 @@ ><font color="#00B04F"><font size="+1"> <a name="details-version"></a>-version </font></font></font></b></td></tr></table> -<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print GraphicsMagick version string</td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print detailed GraphicsMagick version/build information</td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td><font size="-1"> +Reports the release version, maximum sample-depth, web-site URL, +copyright notice, feature support, and the options used while building +the software. This is the same output as produced by the 'version' +sub-command.</font></td></tr></table> +<table BORDER=0 WIDTH="94%"> +<tr> +<td width="3%"><br></td> +<td ALIGN=LEFT BGCOLOR="#FFFFFF"> +<img SRC="images/right_triangle_option.png" +ALT=">" BORDER=0 height=14 +width=15><b><font face="Helvetica, Arial" +><font color="#00B04F"><font size="+1"> + <a name="details-version"></a>-version +</font></font></font></b></td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print compact GNU-style GraphicsMagick version information</td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td><font size="-1"> +Reports the release version, maximum sample-depth, web-site URL, and +copyright notice.</font></td></tr></table> <table BORDER=0 WIDTH="94%"> <tr> <td width="3%"><br></td> diff -r d613dd1c2ce9 -r 5d3f35e77f30 www/animate.html --- a/www/animate.html Thu Apr 11 16:38:16 2024 -0500 +++ b/www/animate.html Sat Apr 20 09:44:02 2024 -0500 @@ -705,7 +705,18 @@ ><font color="#00B04F"><font size="+1"> <a href="GraphicsMagick.html#details-version">-version</a> </font></font></font></b></td></tr></table> -<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print GraphicsMagick version string</td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print detailed GraphicsMagick version/build information</td></tr></table> +<table BORDER=0 WIDTH="94%"> +<tr> +<td width="3%"><br></td> +<td ALIGN=LEFT BGCOLOR="#FFFFFF"> +<img SRC="images/right_triangle_option.png" +ALT=">" BORDER=0 height=14 +width=15><b><font face="Helvetica, Arial" +><font color="#00B04F"><font size="+1"> + <a href="GraphicsMagick.html#details-version">-version</a> +</font></font></font></b></td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print compact GNU-style GraphicsMagick version information</td></tr></table> <table BORDER=0 WIDTH="94%"> <tr> <td width="3%"><br></td> diff -r d613dd1c2ce9 -r 5d3f35e77f30 www/compare.html --- a/www/compare.html Thu Apr 11 16:38:16 2024 -0500 +++ b/www/compare.html Sat Apr 20 09:44:02 2024 -0500 @@ -429,7 +429,18 @@ ><font color="#00B04F"><font size="+1"> <a href="GraphicsMagick.html#details-version">-version</a> </font></font></font></b></td></tr></table> -<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print GraphicsMagick version string</td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print detailed GraphicsMagick version/build information</td></tr></table> +<table BORDER=0 WIDTH="94%"> +<tr> +<td width="3%"><br></td> +<td ALIGN=LEFT BGCOLOR="#FFFFFF"> +<img SRC="images/right_triangle_option.png" +ALT=">" BORDER=0 height=14 +width=15><b><font face="Helvetica, Arial" +><font color="#00B04F"><font size="+1"> + <a href="GraphicsMagick.html#details-version">-version</a> +</font></font></font></b></td></tr></table> +<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print compact GNU-style GraphicsMagick version information</td></tr></table> <p> For a more detailed description of each option, see Options, above. diff -r d613dd1c2ce9 -r 5d3f35e77f30 www/composite.html --- a/www/composite.html Thu Apr 11 16:38:16 2024 -0500