GraphicsMagick: 4 new changesets
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.46509.1647789180.1940.graphicsmagick-commit@lists.sourceforge.net> |
changeset 68d10ffc3941 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=68d10ffc3941 summary: ResourceType comment improvements changeset 236f6ddd8b12 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=236f6ddd8b12 summary: ResourceType documentation updates/improvements. changeset bb8ba356c184 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=bb8ba356c184 summary: Updated the NEWS changeset 4b36e9f2850b in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=4b36e9f2850b summary: Magick++: Support 'ReadResource' diffstat: ChangeLog | 4 + Magick++/lib/Magick++/Include.h | 1 + NEWS.txt | 19 ++++++-- VisualMagick/installer/inc/version.isx | 4 +- magick/resource.h | 4 +- magick/version.h | 4 +- www/Changelog.html | 3 + www/NEWS.html | 17 +++++-- www/api/types.html | 76 ++++++++++++++++++++++++++++----- www/api/types.rst | 60 +++++++++++++++++++++---- 10 files changed, 153 insertions(+), 39 deletions(-) diffs (338 lines): diff -r b2a4fb7af59b -r 4b36e9f2850b ChangeLog --- a/ChangeLog Sat Mar 19 14:00:30 2022 -0500 +++ b/ChangeLog Sun Mar 20 10:12:50 2022 -0500 @@ -1,3 +1,7 @@ +2022-03-20 Bob Friesenhahn <[email protected]> + + * Magick++/lib/Magick++/Include.h: Support 'ReadResource'. + 2022-03-19 Bob Friesenhahn <[email protected]> * coders/jxl.c: Added some debug logging instrumentation so we can diff -r b2a4fb7af59b -r 4b36e9f2850b Magick++/lib/Magick++/Include.h --- a/Magick++/lib/Magick++/Include.h Sat Mar 19 14:00:30 2022 -0500 +++ b/Magick++/lib/Magick++/Include.h Sun Mar 20 10:12:50 2022 -0500 @@ -735,6 +735,7 @@ using MagickLib::ThreadsResource; using MagickLib::WidthResource; using MagickLib::HeightResource; + using MagickLib::ReadResource; // Virtual pixel methods using MagickLib::VirtualPixelMethod; diff -r b2a4fb7af59b -r 4b36e9f2850b NEWS.txt --- a/NEWS.txt Sat Mar 19 14:00:30 2022 -0500 +++ b/NEWS.txt Sun Mar 20 10:12:50 2022 -0500 @@ -34,10 +34,10 @@ * GraphicsMagick really does need some additional productive volunteers. For several years now, the burden has entirely been on - me (Bob Friesenhahn). I have been sheparding the project for 19 + me (Bob Friesenhahn). I have been sheparding the project for 20 years already (and contributed to ImageMagick and GraphicsMagick - combined for 25 years already). It is not reasonable to expect - someone with a full time job (and expecting to retire in a couple of + combined for 26 years already). It is not reasonable to expect + someone with a full time job (and expecting to retire in a few years) to do all of the work. Security Fixes: @@ -45,8 +45,7 @@ * GraphicsMagick is participating in Google's oss-fuzz project due to the contributions and assistance of Alex Gaynor. Since February 4 2018, ??? issues have been opened by oss-fuzz and ?? issues remain - open (most of which are in third-party software such as development - JasPer). The issues list is available at + open. The issues list is available at https://bugs.chromium.org/p/oss-fuzz/issues/list under search term "graphicsmagick". Issues are available for anyone to view and duplicate if they have been in "Verified" status for 30 days, or if @@ -61,8 +60,18 @@ New Features: +* Added support for a 'Read' resource limit. This allows the user to + specify a hard limit for how much data may be read from a file, read + from a pipe, or decompressed from a file (e.g gzip or bzip2) before + a hard error is reported. This resource limit is a useful + alternative to completely disabling support for compressed files + using the --disable-compressed-files option and it provides more + protections as well. + * Added support for reading HEIF/HEIC format. +* Added support for reading and writing JPEG XL format. + API Updates: * None diff -r b2a4fb7af59b -r 4b36e9f2850b VisualMagick/installer/inc/version.isx --- a/VisualMagick/installer/inc/version.isx Sat Mar 19 14:00:30 2022 -0500 +++ b/VisualMagick/installer/inc/version.isx Sun Mar 20 10:12:50 2022 -0500 @@ -10,5 +10,5 @@ #define public MagickPackageName "GraphicsMagick" #define public MagickPackageVersion "1.4" -#define public MagickPackageVersionAddendum ".020220319" -#define public MagickPackageReleaseDate "snapshot-20220319" +#define public MagickPackageVersionAddendum ".020220320" +#define public MagickPackageReleaseDate "snapshot-20220320" diff -r b2a4fb7af59b -r 4b36e9f2850b magick/resource.h --- a/magick/resource.h Sat Mar 19 14:00:30 2022 -0500 +++ b/magick/resource.h Sun Mar 20 10:12:50 2022 -0500 @@ -24,12 +24,12 @@ DiskResource, /* Pixel cache total disk space (Gigabytes) */ FileResource, /* Pixel cache number of open files (Files) */ MapResource, /* Pixel cache total file memory-mapping (Megabytes) */ - MemoryResource, /* Maximum pixel cache heap memory allocations (Megabytes) */ + MemoryResource, /* Maximum heap memory (e.g. malloc) allocations (Megabytes) */ PixelsResource, /* Maximum number of pixels in single image (Pixels) */ ThreadsResource, /* Maximum number of worker threads */ WidthResource, /* Maximum pixel width of an image (Pixels) */ HeightResource, /* Maximum pixel height of an image (Pixels) */ - ReadResource /* Maximum amount of uncompressed file data to read */ + ReadResource /* Maximum amount of uncompressed file data which may be read */ } ResourceType; /* diff -r b2a4fb7af59b -r 4b36e9f2850b magick/version.h --- a/magick/version.h Sat Mar 19 14:00:30 2022 -0500 +++ b/magick/version.h Sun Mar 20 10:12:50 2022 -0500 @@ -38,8 +38,8 @@ #define MagickLibVersion 0x262300 #define MagickLibVersionText "1.4" #define MagickLibVersionNumber 26,23,0 -#define MagickChangeDate "20220319" -#define MagickReleaseDate "snapshot-20220319" +#define MagickChangeDate "20220320" +#define MagickReleaseDate "snapshot-20220320" /* The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines diff -r b2a4fb7af59b -r 4b36e9f2850b www/Changelog.html --- a/www/Changelog.html Sat Mar 19 14:00:30 2022 -0500 +++ b/www/Changelog.html Sun Mar 20 10:12:50 2022 -0500 @@ -35,6 +35,9 @@ <div class="document"> +<p>2022-03-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> +* Magick++/lib/Magick++/Include.h: Support 'ReadResource'.</blockquote> <p>2022-03-19 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> <p>* coders/jxl.c: Added some debug logging instrumentation so we can diff -r b2a4fb7af59b -r 4b36e9f2850b www/NEWS.html --- a/www/NEWS.html Sat Mar 19 14:00:30 2022 -0500 +++ b/www/NEWS.html Sun Mar 20 10:12:50 2022 -0500 @@ -104,10 +104,10 @@ (e.g. related to PNG) which may not be available elsewhere.</li> <li>GraphicsMagick really does need some additional productive volunteers. For several years now, the burden has entirely been on -me (Bob Friesenhahn). I have been sheparding the project for 19 +me (Bob Friesenhahn). I have been sheparding the project for 20 years already (and contributed to ImageMagick and GraphicsMagick -combined for 25 years already). It is not reasonable to expect -someone with a full time job (and expecting to retire in a couple of +combined for 26 years already). It is not reasonable to expect +someone with a full time job (and expecting to retire in a few years) to do all of the work.</li> </ul> <p>Security Fixes:</p> @@ -115,8 +115,7 @@ <li>GraphicsMagick is participating in Google's oss-fuzz project due to the contributions and assistance of Alex Gaynor. Since February 4 2018, ??? issues have been opened by oss-fuzz and ?? issues remain -open (most of which are in third-party software such as development -JasPer). The issues list is available at +open. The issues list is available at <a class="reference external" href="https://bugs.chromium.org/p/oss-fuzz/issues/list">https://bugs.chromium.org/p/oss-fuzz/issues/list</a> under search term "graphicsmagick". Issues are available for anyone to view and duplicate if they have been in "Verified" status for 30 days, or if @@ -130,7 +129,15 @@ </ul> <p>New Features:</p> <ul class="simple"> +<li>Added support for a 'Read' resource limit. This allows the user to +specify a hard limit for how much data may be read from a file, read +from a pipe, or decompressed from a file (e.g gzip or bzip2) before +a hard error is reported. This resource limit is a useful +alternative to completely disabling support for compressed files +using the --disable-compressed-files option and it provides more +protections as well.</li> <li>Added support for reading HEIF/HEIC format.</li> +<li>Added support for reading and writing JPEG XL format.</li> </ul> <p>API Updates:</p> <ul class="simple"> diff -r b2a4fb7af59b -r 4b36e9f2850b www/api/types.html --- a/www/api/types.html Sat Mar 19 14:00:30 2022 -0500 +++ b/www/api/types.html Sun Mar 20 10:12:50 2022 -0500 @@ -2293,8 +2293,8 @@ <td>Replace color for all image pixels matching color at point.</td> </tr> <tr><td>FloodfillMethod</td> -<td>Replace color for pixels surrounding point until encountering pixel that fails -to match color at point.</td> +<td>Replace color for pixels surrounding point until encountering pixel that +fails to match color at point.</td> </tr> <tr><td>FillToBorderMethod</td> <td>Replace color for pixels surrounding point until encountering pixels matching @@ -2752,16 +2752,68 @@ </div> <div class="section" id="resourcetype"> <h1><a class="toc-backref" href="#id49">ResourceType</a></h1> -<pre class="literal-block"> -typedef enum -{ - UndefinedResource, - FileResource, - MemoryResource, - MapResource, - DiskResource -} ResourceType; -</pre> +<p>Resource limits constrain the system resources that a GraphicsMagick +process may consume, or that individual decode/encode and/or image +processing operations may consume. If a resource is expended and +another resource may be substituted (e.g. RAM memory vs an on-disk +temporary file), then the alternative resource is used until it is +also expended. When a resource limit is exceeded and there is no more +alternative resource available then a hard error is reported for the +operation being performed.</p> +<p>Global limits may be applied for the Pixel Cache total disk space +(Gigabytes), the Pixel Cache number of simultaneous open files +(Files), the Pixel Cache total file memory-mapping (Megabytes), the +maximum heap memory allocations (Megabytes), the maximum number of +pixels in single image (Pixels), the maximum number of worker threads, +the maximum pixel width of an image (Pixels), the maximum pixel height +of an image (Pixels), and the maximum amount of uncompressed file data +which may be read while decoding.</p> +<p>Normally these limits should be set before using GraphicsMagick to +perform other operations. Environment variables are available which +may also set these properties when GraphicsMagick is initialized.</p> +<table border="1" class="docutils"> +<caption>ResourceType</caption> +<colgroup> +<col width="30%" /> +<col width="70%" /> +</colgroup> +<tbody valign="top"> +<tr><td>Enumeration</td> +<td>Description</td> +</tr> +<tr><td>UndefinedResource</td> +<td>Undefined value</td> +</tr> +<tr><td>DiskResource</td> +<td>Pixel cache total disk space (Gigabytes)</td> +</tr> +<tr><td>FileResource</td> +<td>Pixel cache number of open files (Files)</td> +</tr> +<tr><td>MapResource</td> +<td>Pixel cache total file memory-mapping (Megabytes)</td> +</tr> +<tr><td>MemoryResource</td> +<td>Maximum heap memory (e.g. malloc) allocations (Megabytes)</td> +</tr> +<tr><td>PixelsResource</td> +<td>Maximum number of pixels in a single image (Pixels)</td> +</tr> +<tr><td>ThreadsResource</td> +<td>Maximum number of worker threads</td> +</tr> +<tr><td>WidthResource</td> +<td>Maximum pixel width of an image (Pixels)</td> +</tr> +<tr><td>HeightResource</td> +<td>Maximum pixel height of an image (Pixels)</td> +</tr> +<tr><td>ReadResource</td> +<td>Maximum amount of uncompressed file data which may be read while +decoding</td> +</tr> +</tbody> +</table> </div> <div class="section" id="segmentinfo"> <h1><a class="toc-backref" href="#id50">SegmentInfo</a></h1> diff -r b2a4fb7af59b -r 4b36e9f2850b www/api/types.rst --- a/www/api/types.rst Sat Mar 19 14:00:30 2022 -0500 +++ b/www/api/types.rst Sun Mar 20 10:12:50 2022 -0500 @@ -1597,8 +1597,8 @@ +------------------+------------------------------------------------------------------------------+ |ReplaceMethod |Replace color for all image pixels matching color at point. | +------------------+------------------------------------------------------------------------------+ - |FloodfillMethod |Replace color for pixels surrounding point until encountering pixel that fails| - | |to match color at point. | + |FloodfillMethod |Replace color for pixels surrounding point until encountering pixel that | + | |fails to match color at point. | +------------------+------------------------------------------------------------------------------+ |FillToBorderMethod|Replace color for pixels surrounding point until encountering pixels matching | | |border color. | @@ -1915,16 +1915,54 @@ ResourceType ============ -:: +Resource limits constrain the system resources that a GraphicsMagick +process may consume, or that individual decode/encode and/or image +processing operations may consume. If a resource is expended and +another resource may be substituted (e.g. RAM memory vs an on-disk +temporary file), then the alternative resource is used until it is +also expended. When a resource limit is exceeded and there is no more +alternative resource available then a hard error is reported for the +operation being performed. + +Global limits may be applied for the Pixel Cache total disk space +(Gigabytes), the Pixel Cache number of simultaneous open files +(Files), the Pixel Cache total file memory-mapping (Megabytes), the +maximum heap memory allocations (Megabytes), the maximum number of +pixels in single image (Pixels), the maximum number of worker threads, +the maximum pixel width of an image (Pixels), the maximum pixel height +of an image (Pixels), and the maximum amount of uncompressed file data +which may be read while decoding. + +Normally these limits should be set before using GraphicsMagick to +perform other operations. Environment variables are available which +may also set these properties when GraphicsMagick is initialized. + +.. table:: ResourceType - typedef enum - { - UndefinedResource, - FileResource, - MemoryResource, - MapResource, - DiskResource - } ResourceType; + +-----------------------------+-------------------------------------------------------------------+ + | Enumeration | Description | + +-----------------------------+-------------------------------------------------------------------+ + |UndefinedResource |Undefined value | + +-----------------------------+-------------------------------------------------------------------+ + |DiskResource |Pixel cache total disk space (Gigabytes) | + +-----------------------------+-------------------------------------------------------------------+ + |FileResource |Pixel cache number of open files (Files) | + +-----------------------------+-------------------------------------------------------------------+ + |MapResource |Pixel cache total file memory-mapping (Megabytes) | + +-----------------------------+-------------------------------------------------------------------+ + |MemoryResource |Maximum heap memory (e.g. malloc) allocations (Megabytes) | + +-----------------------------+-------------------------------------------------------------------+ + |PixelsResource |Maximum number of pixels in a single image (Pixels) | + +-----------------------------+-------------------------------------------------------------------+ + |ThreadsResource |Maximum number of worker threads | + +-----------------------------+-------------------------------------------------------------------+ + |WidthResource |Maximum pixel width of an image (Pixels) | + +-----------------------------+-------------------------------------------------------------------+ + |HeightResource |Maximum pixel height of an image (Pixels) | + +-----------------------------+-------------------------------------------------------------------+ + |ReadResource |Maximum amount of uncompressed file data which may be read while | + | |decoding | + +-----------------------------+-------------------------------------------------------------------+ SegmentInfo