-2019-12-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * NEWS.txt: Updates in preparation for 1.3.34 release.
+ * version.sh: Updates in preparation for the 1.3.35 release.
+ Merge changes for 1.3.35 into GraphicsMagick-1_3 branch.
-2019-12-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * www/INSTALL-windows.rst: Update Windows installation and build
+ documentation.
- * NEWS.txt: Update with changes since the last GM release.
+2020-02-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/png.c (png_read_raw_profile): Use size_t type to store
- profile length and 'nibbles'. Use safer way to test for profile
- buffer overflow.
- (ReadOnePNGImage): Use size_t type to store 'ping_rowbytes',
- 'length', and 'row_offset'. Check png_pixels allocation for
- arithemetic overflow when computing the required allocation size.
+ * NEWS.txt: Update with News since previous release.
- * coders/tiff.c (WriteNewsProfile): Use size_t type to store
- profile length.
-
- * coders/pict.c (WritePICTImage): Avoid 'alloc-size-larger-than'
- warning from GCC when allocating row_bytes.
-
-2019-12-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * tiff/libtiff/tiffconf.h: Add standard/common libtiff 'SUPPORT'
- options which are used in full-fledged Autoconf/Cmake libtiff
- builds but were missing from the Visual C template file. In
- particular, WebP is now supported and JBIG is somewhat supported.
-
- * VisualMagick/jbig/libjbig/LIBRARY.txt (EXCLUDE): Remove
- tstcodec85.c from JBIG library build.
-
- * VisualMagick/configure/configure.cpp: Add JBIG library to
- include path when building libraries. Add WebP as a dependency
- when building libtiff.
-
-2019-12-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/nt_base.h ("C"): Assume that float versions of functions
- became available in Visual Studio 2008.
-
-2019-12-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/log.c (InitializeLogInfo): Using the compiled-in
- defaults, always log to stderr by default, even under Microsoft
- Windows. The logging output may then be diverted to
- 'win32eventlog' as soon as a log.mgk file is loaded if that is
- desired. This should not be much of a problem because loading a
- log.mgk file is the first thing that the library attempts to do.
- This change is made due to users and developers being baffled at
- not seeing any log output due to the log output going to the (very
- unfriendly) Windows application log.
-
- * webp: libwebp is updated to the 1.0.3 release.
-
-2019-12-15 Fojtik Jaroslav <JaFojtik@seznam.cz>
-
- * magick/nt_base.c Fix user only installation of Ghostscript.
-
-2019-12-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * rungm.sh.in (DIRSEP): DIRSEP should always use Unix conventions for
- Autotools-based builds.
-
- * magick/module.h ("C"): Eliminiate redundant and conflicting
- ListModuleInfo() prototype.
-
- * coders/miff.c (ReadMIFFImage): Eliminate warnings in trace
- statements.
-
- * coders/dib.c (DecodeImage): Eliminate warnings in trace
- statements.
-
- * coders/bmp.c (DecodeImage): Eliminate warnings in trace
- statements.
-
- * magick/studio.h (SupportMagickModules): Fix the preprocessor
- logic controlling SupportMagickModules, which became broken for
- GCC MinGW-based builds starting in the 1.3.29 release when a
- "static" module loader was implemented. Due to an error in the
- preprocessor logic, only the "modules" based build was working for
- MinGW. Much thanks to Giovanni Remigi for making us aware of this
- issue.
-
-2019-12-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/pict.c (WritePICTImage): Throw a writer exception if the
- PICT width limit is exceeded. Fixes SourceForge issue 617
- "heap-buffer-overflow in function EncodeImage of coders/pict.c".
-
-2019-12-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * jbig: jbigkit is updated to 2.1 release.
-
- * libxml: libxml2 is updated to 2.9.10 release.
-
- * bzlib: bzip is updated to 1.0.8 release.
-
- * zlib: zlib is updated to 1.2.11 release.
-
- * png: libpng is updated to 1.6.37 release.
-
-2019-12-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * lcms: lcms2 is updated to 2.9 release.
-
- * tiff: libtiff is updated to 4.1.0 release.
-
-2019-11-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (DrawPatternPath): Don't leak memory if
- fill_pattern or stroke_pattern of cloned draw_info are not null.
- Fixes oss-fuzz issue 18948 "graphicsmagick:coder_MVG_fuzzer:
- Indirect-leak in CloneImage".
- (PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
- memory.
-
-2019-11-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
- 17986 "graphicsmagick:coder_JPG_fuzzer: Heap-buffer-overflow in
- GenerateEXIFAttribute". This problem likely only happens in
- 32-bit builds.
-
-2019-11-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (ReadMNGImage): Only magnify the image if the
- requested magnification methods are supported.
-
-2019-11-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/compress.c (HuffmanDecodeImage): Fix signed overflow on
- range check which leads to heap overflow in 32-bit
- applications. Requires a relatively large file input compared with
- typical fuzzer files (greater than a megabyte) to trigger.
- Problem reported to the graphicsmagick-security mail address by
- Justin Tripp on 2019-11-13.
- (Ascii85Tuple): Fix thread safety issue by requiring caller to
- pass in tuple buffer as an argument and having callers allocate
- tuple buffer on the stack.
-
-2019-11-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/bit_stream.c: Add restrict declarations to slightly
- improve performance and decrease code size.
-
- * TclMagick/pkgIndex.tcl: Incorporate recommendations from third
- problem noted in SourceForge issue #420 "TclMagick issues and
- patch". This is supposed to help support using an uninstalled
- GraphicsMagick and allow the installation path to contain a space.
-
- * wand/magick_wand.c (MagickClearException): Destroy any existing
- exception info before re-initializing the exception info or else
- there will be a memory leak.
-
- * TclMagick/generic/libttkcommon.c (myMagickError): Clear
- exception from the Wand after it has been reported. Addresses the
- fourth problem noted by SourceForge issue #420 "TclMagick issues
- and patch". However, MagickClearException() already clears an
- exception in the Wand, so a new function is not needed.
-
- * TclMagick/unix/m4/tcl.m4: Change hard-coded INSTALL path to
- point to config/install-sh. Re-generated/updated Autotools stuff
- by executing the genconf.sh script. Addresses the first problem
- noted by SourceForge issue #420 "TclMagick issues and patch".
-
-2019-11-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/pixel_cache.c (SetNexus): Eliminate warning about
- possibly uninitialized variable from primordial GCC 3.4.3.
-
- * magick/render.c (ConvertPrimitiveToPath): Eliminate warning that
- IsClosedSubPath might be used uninitialized.
-
- * magick/common.h ("MAGICK_FALLTHROUGH"): Added a
- MAGICK_FALLTHROUGH macro to support the GCC/Clang fallthrough
- attribute when the time comes again that it would be useful.
-
-2019-10-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/pcx.c (ReadPCXImage): Verify that pixel region is not
- negative. Assure that opacity channel is initialized to
- opaqueOpacity. Update DirectClass representation while
- PseudoClass representation is updated. Improve read performance
- with uncompressed PCX.
-
-2019-10-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/xpm.c (ReadXPMImage): Image properties are expected to
- appear within the first 512 bytes of the XPM file header. fixes
- oss-fuzz 18267 "graphicsmagick:coder_PICON_fuzzer: Timeout in
- coder_PICON_fuzzer".
-
-2019-10-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * configure.ac: Fix tcmalloc configuration report.
-
-2019-10-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/wpg.c (ReadWPGImage): Implement subimage/subrange
- support.
-
- * coders/mat.c (ReadMATImage, ReadMATImageV4): Implement
- subimage/subrange support. Should resolve oss-fuzz 14999
- "graphicsmagick/coder_MAT_fuzzer: Out-of-memory in
- graphicsmagick_coder_MAT_fuzzer".
-
- * coders/tiff.c (TIFFMapBlob): Fix compile problem if
- LOG_TIFF_BLOB_IO is defined.
-
- * coders/wpg.c (ExtractPostscript): Improve performance. Avoid
- temporary files if possible. Avoid additional memory allocations
- if possible. Should address oss-fuzz issue 18173
- "graphicsmagick:enhance_fuzzer: Timeout in enhance_fuzzer" and
- oss-fuzz issue 17714 "graphicsmagick:coder_WPG_fuzzer: Timeout in
- coder_WPG_fuzzer".
-
-2019-10-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/pnm.c (PNMInteger): Place a generous arbitrary limit on
- the amount of PNM comment text to avoid denial of service
- opportunity. Fixes oss-fuzz 18162 "Timeout · coder_PNM_fuzzer".
-
-2019-10-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/dps.c (ReadDPSImage): Fix memory leak when OpenBlob()
- reports failure. Same as ImageMagick CVE CVE-2019-16709.
-
-2019-09-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/attribute.c (GenerateEXIFAttribute): Skip
- unsupported/invalid format 0. Fixes oss-fuzz issue 17597
- "graphicsmagick:coder_SFW_fuzzer: Heap-buffer-overflow in
- GenerateEXIFAttribute".
-
-2019-09-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * fuzzing/oss-fuzz-build.sh: Change by Alex Gaynor so that the
- correct oss-fuzz fuzzing engine should be used.
-
-2019-09-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/static.c (OpenModule): Static module loader should use
- upper-cased magick string when searching for a module alias.
- Fixes SourceForge issue #613 "static module loader is still
- case-sensitive".
-
-2019-09-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * configure.ac: Report status of zstd (FaceBook Zstandard)
- compression in configuration summary.
-
-2019-09-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (TraceArcPath): Substitute a lineto command when
- tracing arc is impossible. Fixes oss-fuzz 10765
- "graphicsmagick/coder_MVG_fuzzer: Divide-by-zero in TraceArcPath".
-
-2019-09-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (png_read_raw_profile): Fix validation of raw
- profile length. Fixes oss-fuzz 16906
- "graphicsmagick:coder_ICO_fuzzer: Out-of-memory in
- graphicsmagick_coder_ICO_fuzzer".
-
- * coders/wpg.c (ReallocColormap): Avoid dereferencing a null
- pointer if image->colormap is null. Fixes oss-fuzz 17004
- "graphicsmagick:coder_WPG_fuzzer: Null-dereference READ in
- ReallocColormap".
-
-2019-09-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/memory.c (MagickRealloc): Add a note that the behavior of
- this function is as described for BSD reallocf(3), which is now
- appearing in Linux's GNU libc and elsewhere.
-
-2019-09-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * www/OpenMP.rst: Document the significant OpenMP speed-up which
- may be obtained by using an alternate memory allocation library.
- Currently 'tcmalloc', 'mtmalloc', and 'umem' are supported as
+ * magick/magick.c (InitializeMagickSignalHandlers): This private
+ implementation function is now a static function as it should have
+ been.
+ (InitializeMagickEx): New function which may be used in place of
+ InitializeMagick() to initialize GraphicsMagick. This
+ initialization function returns an error status value, may update
+ a passed ExceptionInfo structure with error information, and
+ provides an options parameter which supports simple bit-flags to
+ tailor initialization. The signal handler registrations are
+ skipped if the MAGICK_OPT_NO_SIGNAL_HANDER flag is set in the
options.
- * www/INSTALL-unix.rst: Document new --with-tcmalloc option to
- enable using Google gperftools tcmalloc library.
-
- * configure.ac: Add support for using Google gperftools tcmalloc
- library via the --with-tcmalloc option.
-
- * scripts/rst2htmldeco.py: Port to Python 3 syntax and require at
- least Python 2.6.
-
- * scripts/relpath.py: Port to Python 3 syntax and require
- at least Python 2.6.
-
- * scripts/html_fragments.py: Port to Python 3 syntax and require
- at least Python 2.6.
-
- * scripts/format_c_api_doc.py: Port to Python 3 syntax and require
- at least Python 2.6.
-
-2019-08-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * doc/GraphicsMagick.imdoc: Document gm utility exit status codes.
-
-2019-08-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (PRIMITIVE_INFO_POINTS_MAX): SIZE_MAX apparently
- rounds up by one when cast to a double on 64-bit systems. Due to
- this, and in order to set more rational implementation limits, add
- a PRIMITIVE_INFO_POINTS_MAX definition which computes and
- constrains the maximum number of PrimitiveInfo entries allowed.
-
-2019-08-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/attribute.c (GenerateEXIFAttribute): Check that we are
- not being directed to read an IFD that we are already parsing and
- quit in order to avoid a loop. Addresses oss-fuzz 15753
- "graphicsmagick/coder_JPEG_fuzzer: Timeout in
- graphicsmagick_coder_JPEG_fuzzer" and 16068
- "graphicsmagick/coder_SFW_fuzzer: Timeout in
- graphicsmagick_coder_SFW_fuzzer".
-
- * tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
- irritating GCC 9 "__builtin_strncpy' output may be truncated"
- warnings due to copying MaxTextExtent-1 characters. Instead
- request copying all of the characters and also assure that string
- is still null terminated.
-
- * doc/environment.imdoc: Update documentation pertaining to HOME
- and MAGICK_DEBUG environment variables.
-
-2019-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/log.c (DestroyLogInfo): Only output text to terminate an
- XML format log file if XML format is active.
-
-2019-08-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (ExtractTokensBetweenPushPop): Previous fix for
- non-terminal loop was broken by a last-minute untested edit.
- Finally addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer:
- Timeout in graphicsmagick_coder_MVG_fuzzer".
-
-2019-08-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * fuzzing/utils.cc (MemoryResource): Lessen the memory limit used
- for oss-fuzz testing in order to provide more headroom and margin
- for error.
-
- * magick/render.c (TraceBezier): Detect arithmetic overflow and
- return errors via normal error path rather than exiting. Fixes
- oss-fuzz 16450 "graphicsmagick:coder_MVG_fuzzer: Unexpected-exit
- in DefaultFatalErrorHandler".
- (PrimitiveInfoRealloc): Implement more paranoid code related to
- primitive allocation.
-
-2019-08-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (DrawStrokePolygon): Handle case where
- TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
- "graphicsmagick/coder_MVG_fuzzer: ASSERT: primitive_info !=
- (PrimitiveInfo *) NULL".
- (DrawDashPolygon): Handle case where DrawStrokePolygon() returns
- MagickFail. Also needed to address oss-fuzz 15516, since otherwise
- test-cases run for a very long time.
- (ExtractTokensBetweenPushPop): Fix non-terminal parsing loop.
- Addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer: Timeout
- in graphicsmagick_coder_MVG_fuzzer".
-
-2019-08-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/memory.h (MagickMallocAlignedArray): Add function
- attributes for added value and to quench GCC 9 warning with
- special build options enabled.
-
- * magick/deprecate.h (AcquireMemory): Add more function attributes
- to quench GCC 9 warning with special build options enabled.
-
- * magick/attribute.c (GenerateEXIFAttribute): Fix compilation
- warning in 32-bit build.
-
- * coders/dpx.c (AttributeToString): Eliminate annoying warnings
- from GCC 9, although the code was correct.
-
- * coders/msl.c (MSLStartElement): Fix defective opacity percentage
- code revealed by GCC 9 warning.
-
-2019-08-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (ReadMNGImage): Skip coalescing layers if there is
- only one layer. Fixes oss-fuzz 16274
- "graphicsmagick/coder_MNG_fuzzer: Unexpected-exit in
- DefaultFatalErrorHandler".
-
-2019-08-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (ReadPNGImage): Post-processing to convert the
- image type in the PNG reader based on a specified magick prefix
- string is now disabled. This can (and should) be done after the
- image has been returned. Fixes oss-fuzz 16386
- "graphicsmagick:coder_PNG8_fuzzer: Timeout in
- graphicsmagick_coder_PNG8_fuzzer".
-
-2019-07-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * NEWS.txt: Updates in preparation for 1.3.33 release.
-
-2019-07-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * NEWS.txt: Updated NEWS to reflect updates since last release.
-
-2019-07-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (WriteOnePNGImage): Fix saving to palette when
- image has an alpha channel but no color is marked as transparent.
- Patch submitted by Przemysław Sobala via SourceForge patch #61
- "WriteOnePNGImage(): Fix saving to palette when image has an alpha
- channel but no color is marked as transparent".
-
- * doc/options.imdoc (characters): Fix -format documentation to
- reflect that '%r' returns the image type. Patch submitted by
- Przemysław Sobala via SourceForge patch #60 "Fix documentation
- typo".
-
-2019-07-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/tempfile.c (AcquireTemporaryFileDescriptor): Fix
- compilation under Cygwin. Patch by Marco Atzeri and submitted via
- email to the graphicsmagick-help mailing list on Fri, 5 Jul 2019.
-
-2019-06-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/attribute.c (GenerateEXIFAttribute): Added range checks
- and tracing. Fixes oss-fuzz 14998
- "graphicsmagick/coder_JPEG_fuzzer: Heap-buffer-overflow in
- Read32s". This is a tiny read overflow.
-
- * coders/miff.c (ReadMIFFImage): Similar fix as to mpc.c
-
- * coders/mpc.c (ReadMPCImage): Fix faulty signed overflow logic
- for profiles[i].length which still allowed overflow. Fixes
- oss-fuzz issue 15190 "graphicsmagick/coder_MPC_fuzzer:
- Out-of-memory in graphicsmagick_coder_MPC_fuzzer".
-
- * doc/options.imdoc: Add notes about security hazards due to
- commands which support a '@filename' syntax.
-
- * www/security.rst: Add notes about security hazards due to
- commands which support a '@filename' syntax.
-
-2019-06-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (DrawImage): Assure that 'token' is initialized.
- Fixes oss-fuzz issue 14897 "graphicsmagick/coder_MVG_fuzzer:
- Use-of-uninitialized-value in DrawImage".
-
- * magick/animate.c (MagickXAnimateImages): Fix memory leak of
- scene_info.pixels.
-
- * magick/display.c (MagickXDisplayImage): Fix heap overwrite of
- windows->image.name and windows->image.icon_name buffers. It
- appears that the code assumed that CloneString() would always
- allocated a string at least MaxTextExtent in size. I assume that
- this issue has existed for a very long time since CloneString()
- was re-written many years ago.
-
- * coders/caption.c (ReadCAPTIONImage): The CAPTION reader did not
- appear to work at all any more. Now it works again, but still not
- very well.
+2020-02-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/command.c: Re-implement '@' file inclusion support for
- -comment, -draw, -format, and -label which was removed for the
- 1.3.32 release. Note that arguments from untrusted sources will
- still need to be sanitized to detect attempts to subvert this
- feature to access file data, but this feature has always been
- supported by GraphicsMagick and it originated early in the
- development of ImageMagick.
+ * magick/magick.c (MagickToMime): Add a MIME translation for
+ "jpg". Issue reported by Pro Turm.
-2019-06-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/utility.c (MagickStrlCat, MagickStrlCpy): Add debug
- checks enabled by MAGICK_STRL_CHECK.
+ * www/INSTALL-windows.rst: Add quoting to avoid losing backslashes
+ in Windows paths.
- * magick/montage.c (MontageImages): Fix wrong length argument to
- strlcat() when building montage directory, which could allow heap
- overwrite.
+2020-02-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/png.c (RegisterPNGImage): Pass correct size value to
- strlcat(). Under Apple's OS X (and possibly other targets)
- strlcat() writes bytes beyond what it needs to (but within the
- range it is allowed to) causing a crash due to the wrong limit
- value. Fixes SourceForge issue #609 `gm identify foo.png` crashes
- on macOS (v 1.3.32).
+ * magick/common.h: Add missing unsupported handling for some
+ recently added GCC/Clang attributes.
- * www/Changes.rst: Update ChangeLog links due to new year, and
- 1.3.32 release.
+ * magick/: Move all remaining private implementation code in
+ public headers which is guarded by MAGICK_IMPLEMENTATION into
+ private headers, which are never installed.
-2019-06-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/bmp.c (WriteBMPImage): Detect arithmetic overflow of
- image_size. Add more tracing. Reduce compilation warnings.
- (EncodeImage): Reduce compilation warnings.
- (WriteBMPImage): Assure that chromaticity uses double-precision
- for multiply before casting to unsigned integer.
+ * coders/tiff.c (WriteTIFFImage): Evidence suggests that large
+ strip sizes improve performance by reducing the number of I/Os.
+ The defaults suggested by libtiff are way to small for today's
+ images and computers. Default TIFF strip sizes so that each
+ uncompressed strip consumes up to 1MiB of memory, or 4MiB for FAX
+ oriented codecs, or based on LZMA compression level when using
+ LZMA compression. The default size may be adjusted via the
+ TIFF_BYTES_PER_STRIP preprocessor definition.
- * coders/wpg.c (ReallocColormap): Reduce compilation warnings.
+2020-02-09 Fojtik Jaroslav <JaFojtik@seznam.cz>
- * coders/braille.c (WriteBRAILLEImage): Reduce compilation
- warnings.
+ * coders/wpg.c ZeroFillMissing data will never been triggered when
+ y>=image->rows.
- * coders/dib.c (WriteDIBImage): Detect arithmetic overflow of
- image_size. Reduce compilation warnings.
- (EncodeImage): Reduce compilation warnings.
+2020-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/locale.c (WriteLOCALEImage): Reduce compilation warnings.
+ * magick/render.c (DrawImage): Limit pattern dimensions by
+ LONG_MAX rather than ULONG_MAX since this seems more likely to
+ avoid arithmetic overflows later on.
-2019-06-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-09 Fojtik Jaroslav <JaFojtik@seznam.cz>
- * Makefile.am (dist-zstd): Use the maximum possible compression
- level (22) when creating a Zstd-compressed tarball to get close to
- lzip/xz compression levels.
+ * coders/wpg.c Check for exception in image.
- * coders/tiff.c (ReadTIFFImage): Fix typo in initialization of
- 'tile' pointer variable.
+2020-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * version.sh: Updates in preparation for 1.3.32 release.
+ * magick/command.c (VersionCommand): Add Google perftools tcmalloc
+ to the available feature support.
-2019-06-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * www/INSTALL-unix.rst: Include some information about building
+ with MSYS2.
- * Makefile.am (release): Add a release target to make it easier to
- produce and sign the release files. Add a zstd-compressed output
- tarball just because we can.
+ * coders/png.c (ReadOnePNGImage): Eliminate compilation warnings
+ about signed/unsigned comparisons.
-2019-06-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick/image.c: Remove private global string constants, and one
+ private global unsigned long constant, from the library ABI.
+ Since the global constants were declared via a private header and
+ only used within the GraphicsMagick build, removing these does not
+ impact the public ABI. The globals removed are BackgroundColor,
+ BorderColor, DefaultTileFrame, DefaultTileGeometry,
+ DefaultTileLabel, ForegroundColor, HighlightColor, MatteColor,
+ PSDensityGeometry, PSPageGeometry, and DefaultCompressionQuality.
- * magick/render.c (DrawImage): Fix typo when initializing
- number_coordinates. Somehow GCC and clang let this typo slip by.
+2020-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-06-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick/render.c (DrawImage): Apply draconian pattern
+ specification offset and dimension validations. Hopefully there
+ is no impact to usability. If so please report it as a bug.
+ Fixes oss-fuzz 20586 "graphicsmagick:coder_MVG_fuzzer:
+ Integer-overflow in DrawPolygonPrimitive".
- * coders/dib.c (ReadDIBImage): Preserve PseudoClass opaque
- representation if ICO mask is opaque, otherwise return a
- DirectClass image.
+ * coders/svg.c (ReadSVGImage): Fix dereference of NULL pointer
+ when stopping image timer.
-2019-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/render.c (DrawImage): Detect an error in TracePath() and
- quit rather than forging on.
+ * coders/pict.c (DecodeImage): Allocate extra scanline memory to
+ allow small RLE overrun. Fixes oss-fuzz 20271
+ "graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
+ ExpandBuffer" and 20272 "graphicsmagick:coder_PICT_fuzzer:
+ Heap-buffer-overflow in DecodeImage".
-2019-06-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * PerlMagick/t/wmf/read.t: Update WMF reference images. Relax
+ test requirements for ski.wmf.
- * magick/render.c (DrawImage): Terminate drawing if
- DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
- "graphicsmagick/coder_MVG_fuzzer: Timeout in
- graphicsmagick_coder_MVG_fuzzer".
- (TracePath): Terminate path parsing upon first parsing error.
+ * locale/C.mgk: Correct error message associated with
+ "UnsupportedNumberOfRows". Patch was submitted by Thorsten
+ Alteholz via private email on 2020-02-05.
-2019-06-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/txt.c (ReadTXTImage): Use real a new-line character as
- line delimiter rather than '\n' string.
+ * coders/topol.c: Include magick/magick_endian.h.
- * magick/annotate.c (AnnotateImage): No longer implicitly call
- TranslateText() since this is not suitable for most use-cases and
- causes additional performance impact. The API user can perform
- such translations in advance on the text string using
- TranslateText() if need be. No longer call StringToList() to
- split strings into an array of strings since this can lead to
- unexpected results, and a custom-splitter is more efficient.
+2020-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-06-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick, coders, wand: Added copious casts to avoid possible
+ integer overflows in the Microsoft Windows 64-bit build, where
+ sizeof(long) < sizeof(size_t).
- * magick/render.c (DrawImage): Only support '@filename' syntax to
- read drawing primitive from a file if we are not already drawing.
+2020-01-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/utility.c (TranslateTextEx): Remove support for reading
- from a file using '@filename' syntax due to security concerns.
- Problem was reported to us by "Battle Furry" via the
- GraphicsMagick security mail alias on June 6, 2019.
+ * magick/render.h ("PrimitiveInfo"): Change PrimitiveInfo
+ coordinates from type 'unsigned long' to 'size_t'.
-2019-06-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/utility.c (SetClientFilename): Reduce initialized data
- some more.
+ * magick/gradient.c (GradientImage): Warnings reduction, plus note
+ about incorrect diagonal gradients math.
-2019-06-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-20 Fojtik Jaroslav <JaFojtik@seznam.cz>
- * magick/nt_base.c: Search for n019003l.pfb (the "Helvetica"-like
- font) rather than fonts.dir since fonts.dir is not present in all
- URW font collections.
+ * VisualMagick\configure\configure.cpp Option /arch:SSE2 is
+ available only for 32 bit build.
- * NEWS.txt: Update news.
+2020-01-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-06-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/pcd.c (DecodeImage): Assure that pcd_length gets
+ initialized with something.
- * coders/logo.c: Tidy logo image definitions, and logo image
- output.
+ * Magick++/lib/Options.cpp (strokeDashArray): Add needless check
+ for _drawInfo->dash_pattern null in order to make static analysis
+ happy.
-2019-05-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick/render.c (DestroyPolygonInfo): Make sure to not
+ dereference a null edges pointer.
- * coders/mat.c: Make more data const.
+ * coders/pdb.c (WritePDBImage): Make sure that null comment value
+ is not dereferenced.
-2019-05-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/vid.c (ReadVIDImage): Make sure that
+ ThrowVIDReaderException does not dereference a null pointer.
- * magick/animate.c: Reduce initialized static allocations.
+ * magick/quantize.c (ClassifyImageColors): Fix error handling so a
+ null pointer won't be consumed after a memory allocation failure.
+ Changed the location of some variable declarations and added some
+ comments.
- * magick/display.c: Reduce initialized static allocations.
+2020-01-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/widget.c (MagickSplitNDLTextToList): Add static
- implementation function.
-
-2019-05-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/webp.c (RegisterWEBPImage): Use sprintf to format version
- since snprintf is not available in old Visual Studio.
-
-2019-05-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/dcm.c: Make more data const.
-
- * www/INSTALL-unix.rst: Add documentation for how to install URW
- fonts from various package management systems.
-
-2019-05-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * www/authors.rst: Add authorship attribution to Samuel Thibault
- for contributing support for the Braille image format.
-
- * coders/braille.c: Add support for Braille image format by Samuel
- Thibault. Patch submitted via SourceForge patch #59 "Add braille
- image format support.
-
-2019-05-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/tempfile.c: Make more data const.
-
- * magick/signature.c: Make more data const.
-
- * magick/quantize.c: Make more data const.
-
- * magick/attribute.c: Make more data const.
-
- * coders/png.c: Make more data const.
-
- * coders/mpeg.c: Make more data const.
-
- * coders/wmf.c: Make more data const.
-
- * coders/tile.c: Make more data const.
-
-2019-05-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/enum_strings.c: Make more data const.
-
-2019-05-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/magick.c: Make more data const.
-
- * magick/type.c (GetTypeInfoByFamily): Make more data const.
-
- * magick/unix_port.c (MagickGetMMUPageSize): Decrease initialized
- data.
-
- * magick/utility.c (GetPageGeometry): Make more data const.
-
- * coders/pdf.c (WritePDFImage): Allocate working buffer on stack
- and pass as argument to EscapeParenthesis() to eliminate a thread
- safety problem and also reduce BSS size.
-
- * coders/webp.c (RegisterWEBPImage): Fix compiler warning.
-
- * coders/jbig.c (RegisterJBIGImage): Make more data const.
-
- * coders/pict.c (DecodeImage): Allocate output buffer used by
- ExpandBuffer() on the stack rather than as static data private to
- ExpandBuffer(). Eliminates a thread safety problem and also
- reduces BSS size.
-
- * coders/webp.c (RegisterWEBPImage): Reduce BSS size.
-
-2019-05-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/jp2.c: Make more data const.
-
- * coders/wmf.c: Make more data const.
-
- * coders/ps.c (WritePSImage): Make more data const.
-
- * coders/ps2.c (WritePS2Image): Make more data const.
-
-2019-05-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/static.c: Revert to previous 'name' storage. Callback
- functions in structure block being properly const.
-
- * coders/xpm.c: Make more data const.
-
- * coders/pnm.c: Make more data const.
-
- * coders/palm.c: Make more data const.
-
- * coders/meta.c: Make more data const.
-
- * coders/dcraw.c: Make more data const.
-
- * magick/command.c: Fix compilation problem when HasX11 is not
- defined.
-
-2019-05-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/command.c: Make more data const.
-
-2019-05-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/webp.c (RegisterWEBPImage): Make more data const.
-
- * coders/svg.c (RegisterSVGImage): Reduce BSS size.
-
- * coders/miff.c (RegisterMIFFImage): Fix version reporting.
-
- * coders/ttf.c (RegisterTTFImage): Fixed reporting of FreeType
- version.
-
- * coders/tiff.c (RegisterTIFFImage): Reduce BSS size.
-
- * coders/sfw.c (ReadSFWImage): Make SFW static data completely
- const.
-
- * coders/ps3.c: Make PS3 static data completely const.
-
- * coders/pict.c: Make PICT static data completely const.
-
- * magick/error.c (ThrowException, ThrowLoggedException): Handle
- the case where some passed character strings refer to existing
- exception character strings. Fixes SourceForge issue #603
- "heap-use-after-free in function ThrowLoggedException of
- magick/error.c".
- (CatchException): Restructure so there is one return point.
-
- * coders/miff.c (ImportRLEPixels): Fix heap overflow caused by a
- typo in the code. Also fix undefined behavior caused by large
- left shifts of an unsigned char. Fixes SourceForge issue #608
- "heap-buffer-overflow in ImportRLEPixels of coders/miff.c.
-
-2019-05-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/bmp.c (ReadBMPImage): Fix subrange/scene handling in
- 'ping' mode so it is like the other formats. Only the first frame
- was being enumerated while in 'ping' mode.
-
-2019-05-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * NEWS.txt: Update news.
-
- * magick/utility.c (ExpandFilenames): Only expand '@filename' to a
- list of arguments read from 'filename' if the path '@filename'
- does not exist. This fix is made based on an email posting to the
- 'graphicsmagick-help' mailing list at SourceForge by "Test User"
- on Tue, 7 May 2019.
-
-2019-05-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/colorspace.c: Reorder initialization of colorspace tables
- for a possible performance improvement.
-
- * magick/fx.c (WaveImage): Use float for sin map.
-
- * configure.ac: Test for float versions of math functions.
-
- * magick/gem.c (GenerateDifferentialNoise): Use float versions of
- math functions when available.
-
-2019-05-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * www/INSTALL-unix.rst: Expanded configure documentation for
- --with-modules. Added specific configure documentation for
- --with-umem and --with-mtmalloc, which may be useful on
- Solaris-derived systems.
-
-2019-04-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/command.c (VersionCommand): Show OpenMP specification
- version corresponding to version enumeration.
-
- * magick/locale.c (GetLocaleMessageFromTag): Eliminate clang
- warning about comparison with a constant value.
-
- * magick/log.c (InitializeLogInfo): Initialize LogInfo log_configured.
-
-2019-04-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/magic.c (struct): Ajust StaticMagic definition to be more
- const-friendly.
-
- * magick/color_lookup.c (struct): Adjust StaticColors definition
- to be more const-friendly.
-
- * magick/attribute.c: Ajust tag_table definition to be more
- const-friendly.
-
- * magick/log.c: Allocate LogInfo from heap as we used to do.
-
- * magick/locale.c (GetLocaleMessageFromTag): Adaptations to locale
- coder output changes.
-
- * coders/locale.c (WriteLOCALEImage): Adjust locale coder output
- to be more const.
-
-2019-04-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/color_lookup.c: Make built-in color tables fully const.
-
- * magick/animate.c: Use MagickXTextViewWidgetNDL() to display help
- text.
-
- * magick/display.c: Use MagickXTextViewWidgetNDL() to display help
- text.
-
- * magick/widget.c (MagickXTextViewWidgetNDL): New private function
- to display multi-line null-delimited text in an X11 widget.
-
- * coders/xwd.c (ReadXWDImage): Added even more XWD header
- validation logic. Addresses problems noted by email from Hongxu
- Chen to the graphicsmagick-security mail alias on Fri, 19 Apr 2019
- and Sat, 20 Apr 2019 and entitled "Multiple crashes (FPE and
- invalid read) when processing XWD files".
-
-2019-04-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/xwd.c (ReadXWDImage): Added even more XWD header
- validation logic. Addresses problems noted by email from Hongxu
- Chen to the graphicsmagick-security mail alias on Wed, 17 Apr 2019
- and entitled "Multiple crashes (FPE and invalid read) when
- processing XWD files". Also addresses additional issues noted
- that an attacker could request to allocate an arbitrary amount of
- memory based on ncolors and the claimed header size.
-
-2019-04-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/xwd.c (ReadXWDImage): Add more XWD header validation
- logic. Addresses problems noted by email from Hongxu Chen to the
- graphicsmagick-security mail alias on Sun, 14 Apr 2019 and
- entitled "Multiple crashes (FPE and invalid read) when processing
- XWD files".
-
-2019-04-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/pdb.c (WritePDBImage): Assure that input scanline is
- cleared in order to cover up some decoder bug. May fix 14215
- "graphicsmagick/coder_PDB_fuzzer: Use-of-uninitialized-value in
- WritePDBImage", which I have not been able to reproduce.
-
- * magick/render.c (DrawPrimitive): Check primitive point x/y
- values for NaN.
- (DrawImage): Fix oss-fuzz issue 14173
- "graphicsmagick/coder_MVG_fuzzer: Integer-overflow in DrawImage".
-
- * magick/pixel_cache.c (SetNexus): Fix oss-fuzz issue 14208
- "graphicsmagick/coder_MVG_fuzzer: Integer-overflow in SetNexus".
-
-2019-04-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/display.c: Add even more const declarations.
-
- * coders/mat.c (WriteMATLABImage): Add completely missing error
- handling. Fixes SourceForge issue #604 "heap-buffer-overflow in
- function WriteMATLABImage of coders/mat.c".
-
-2019-04-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
- "heap-buffer-overflow in function WritePDBImage of coders/pdb.c".
-
- * magick/widget.c: Add many const declarations.
-
- * magick/display.c: Incorporate and eliminate display.h. Add many
- const declarations.
-
- * magick/animate.c: Incorporate and eliminate animate.h. Add many
- const declarations.
-
-2019-04-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
- bounding box. Fixes SourceForge issue #606 "Division by Zero in
- coders/wmf.c".
-
-2019-04-07 Fojtik Jaroslav <JaFojtik@seznam.cz>
-
- * magick/nt_base.c Fix a problem of finding ghostscript fonts.
- Variable "font_dir" was useless and thus removed. No need to copy
- text multiple times. Use const char gs_font_dir[] instead of
- pointer.
-
-2019-04-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/xwd.c (ReadXWDImage): Perform more header validations and
- a file size validation in order to reject files with bogus
- headers.
- (WriteXWDImage): Fix SourceForge issue #599
- "heap_buffer_overflow_WRITE in function WriteXWDImage of
- coders/xwd.c".
-
-2019-04-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/svg.c (SVGStartElement): Fix stack buffer overflow while
- parsing quoted font family value. Fixes SourceForge issue #600
- "stack-buffer-overflow in function SVGStartElement of
- coders/svg.c".
-
- * coders/miff.c (ReadMIFFImage): Detect end of file while reading
- RLE packets. Fixes SourceForge issue #598 "heap-buffer-overflow
- in function ReadMIFFImage of coders/miff.c".
-
-2019-04-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
- reading DirectClass XWD file. Fixes SourceForge issue #597
- "heap-buffer-overflow in function ReadXWDImage of coders/xwd.c".
-
-2019-04-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (ReadMNGImage): Fix small buffer overflow (one
- PixelPacket) of image colormap. Fixes SourceForge issue #596
- "heap-buffer-overflow in function CloneImage of magick/image.c".
-
- * magick/colormap.c (ReallocateImageColormap): New function to
- reallocate an image colormap.
-
- * coders/logo.c: Make more static data const.
-
- * magick/module_aliases.h: Make more static data const.
-
- * magick/static.c: Make more static data const.
-
-2019-04-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/log.c (LogMagickEventList): Log elapsed time with
- microsecond precision.
-
-2019-03-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/mpc.c (ReadMPCImage): Deal with a profile length of zero,
- or an irrationally large profile length. Fixes SourceForge issue
- #601 "memory leak in function ReadMPCImage of coders/mpc.c ".
-
- * magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
- case that the memory allocation for window->segment_info
- fails. Fixes SourceForge #595 "use allocate memory before null
- check" as pertains to magick/xwindow.c.
-
- * magick/segment.c (Classify): Add check for memory allocation
- failure when allocating cluster array. Fixes SourceForge #595 "use
- allocate memory before null check" as pertains to
- magick/segment.c.
-
- * coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
- null check. Fixes SourceForge #595 "use allocate memory before
- null check" as pertains to coders/pdb.c.
-
-2019-03-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/pixel_cache.c (AllocateThreadViewSet): Simplify the image
- view model by adding NexusInfo to the View structure (rather than
- referencing it via a pointer) to lessen the number of required
- per-thread allocations and to improve locality of reference.
-
-2019-03-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/wpg.c (WPG1_Palette): Change to a static declaration.
-
- * coders/dcm.c: dicom_info array is now fully in the data segment.
-
-2019-03-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/caption.c (ReadCAPTIONImage): Assure that metrics are
+ initialized.
- * configure.ac: Add support for using the Solaris mtmalloc
- library. This is primarily for testing or as an alternative to
- Solaris umem.
- Stop using posix_memalign() until it is uniformly more mature and
- reliably quick.
+ * magick/pixel_cache.c (DestroyThreadViewSet): Check if views
+ pointer is not null before destroying views.
-2019-03-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/xpm.c (ReadXPMImage): Properly detect the case where the
+ XPM colormap is not fully initialized.
- * magick/pixel_cache.c (SetNexus): Smallest staging-area
- allocation is cache line size so declare it as such.
+ * coders/pict.c (DecodeImage): Fix heap buffer over-reads. Fixes
+ oss-fuzz issue 20053 "graphicsmagick:coder_PICT_fuzzer:
+ Heap-buffer-overflow in ExpandBuffer" and oss-fuzz issue 20048
+ "graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
+ DecodeImage". Both of these oss-fuzz issues appeared due to
+ recent changes since the last release.
- * magick/fx.c: Functions in the fx module which return a new Image
- should return a null Image if an exception was thrown. Also,
- assure that user has an opportunity to see the exception which was
- thrown.
+ * coders/meta.c (WriteMETAImage): Assure that 'iptc_offset' is
+ initialized and valid.
- * magick/error.c (ThrowLoggedException): Throwing an exception is
- now thread-safe.
+ * coders/jpeg.c (ReadJPEGImage): Assure that evaluating the
+ embedded profile length does not suffer from undefined behavior.
- * magick/pixel_cache-private.h: Moved pixel cache private
- definitions to private header.
+2020-01-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-03-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick/render.c (DrawImage): Add more MVG parser validations.
- * magick/pixel_cache.c (SetNexus): Pass x, y, columns, and rows
- rather than a pointer to RectangleInfo. This should be easier to
- inline on modern CPUs.
+2020-01-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-03-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/histogram.c (WriteHISTOGRAMImage): Histogram coder was
+ relying on the previously removed '@' file inclusion feature to
+ insert the histogram comment text. Write a PseudoClass MIFF image
+ with RLE compression. Fixes SourceForge issue #622 "Histogram
+ produces incorrect color table attribute ".
- * magick/pixel_cache.c (SetNexus): Cache resource limits in
- CacheInfo rather than repeatedly calling into the resource code in
- order to lessen the overhead of performing resource limit checks
- on the pixel cache views.
+ * magick/pixel_cache.c (ModifyCache): Re-open the pixel cache if
+ the cache rows/columns do not match the owning image rows/columns.
- * magick/resource.c (AcquireMagickResource): Use a lock for each
- resource in order to lessen contention. Return a maximum 64-bit
- integer value if the resource has not been limited. Previously
- returned -1 in this case but this was not documented.
+ * magick/transform.c (TransformImage): TransformImage now returns
+ a MagickPassFail return status value rather than void.
-2019-03-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/pict.c (ReadPICTImage): Fix some over-strict validations
+ which were preventing some PICT files which were previously read
+ successfully from being accepted. Fix problems which occurred when
+ the clipping rectangle changed the image size. Improve reading
+ embedded JPEG blobs. Now successfully reads all raster PICT files
+ I have available.
- * magick/import.c (ImportViewPixelArea): If range between max and
- min is less than MagickEpsilon, produce a black image rather than
- throwing an exception.
+2020-01-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/mat.c (ReadMATImage): Fix memory leak on unexpected end
- of file. Fixes oss-fuzz 13556 "graphicsmagick/coder_MAT_fuzzer:
- Direct-leak in ReadMATImage". (Credit to OSS-Fuzz)
+ * coders/pict.c (ReadPICTImage): Be more strict about PICT
+ rectangle by treating rectangle dimensions as if they are a 16-bit
+ signed type and not allowing negative values. Avoid GCC warnings
+ which sprung up similar to "warning: comparison is always false
+ due to limited range of data type".
-2019-03-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * coders/mat.c (ReadMATImage): Quit if image scanlines are not
- fully populated due to exception. Fixes oss-fuzz 13530
- "graphicsmagick/coder_MAT_fuzzer: Use-of-uninitialized-value in
- InsertComplexFloatRow". (Credit to OSS-Fuzz)
+ * coders/sfw.c (ReadSFWImage): Restore a DestroyImage() statement
+ which was accidentally deleted by recent edits. Fixes oss-fuzz
+ "Issue 19819 in oss-fuzz: graphicsmagick:coder_SFW_fuzzer:
+ Indirect-leak in AllocateImage".
-2019-03-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/png.c (WriteOneJNGImage): Detect when JPEG encoder has
+ failed, and throw exception. Fix image dimension limit
+ validations. Stop discarding exception report. Fixes SourceForge
+ bug #621 "Assertion in WriteBlob at magick/blob.c:4937" which was
+ reported by Suhwan Song.
- * coders/txt.c (ReadTXTImage): Don't start new line if x_max <
- x_min. Avoids calling SetImagePixels() with a width of zero.
- Related to oss-fuzz 13521 "graphicsmagick/coder_TEXT_fuzzer:
- Floating-point-exception in SetNexus". (Credit to OSS-Fuzz)
+ * coders/pict.c (WritePICTImage): Eliminating small buffer overrun
+ when run-length encoding pixels. Fixes SourceForge bug #620
+ "heap-buffer-overflow in EncodeImage at coders/pict.c:1114" which
+ was reported by Suhwan Song.
- * magick/pixel_cache.c (SetNexus): Report error for empty region
- rather than crashing due to divide by zero exception. This is a
- new bug due to yesterday's changes. Fixes oss-fuzz 13521
- "graphicsmagick/coder_TEXT_fuzzer: Floating-point-exception in
- SetNexus". (Credit to OSS-Fuzz)
+ * coders/logo.c (ReadLOGOImage): PATTERN error handling was
+ incomplete. Add appropriate error handling.
+ (ReadLOGOImage): Switch to using ConstituteTextureImage() rather
+ than TextureImage() since it is more appropriate for this purpose.
+ (ReadLOGOImage): Oops! Accidental change of behavior. When size
+ is not supplied, simply return the pattern image.
-2019-03-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * design/pixel-cache.dot: Update design dot diagram to remove
- IsNexusInCore and add CompositeCacheNexus.
+ * coders/*.c (ReadFOOImage): Stop image timer just before
+ returning from reader so that reported timings are correct when
+ used in the future.
- * magick/pixel_cache.c (SetNexus): Apply resource limits to pixel
- nexus allocations using the same limits (total pixels, width,
- height, memory) as applied to the whole image since some requests
- are directly influenced by the input file. Add yet more tests for
- arithmetic overflow. Whole source module is re-arranged so that
- static functions are in order of dependency so that forward
- prototype declarations are no longer needed. Fixes oss-fuzz 13210
- "graphicsmagick/coder_MVG_fuzzer: Integer-overflow in
- SetNexus". (Credit to OSS-Fuzz)
+2020-01-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-03-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick/timer.c (StartTimer): Expose previously existing
+ StartTimer() function.
+ (StopTimer): Expose previously existing StartTimer() function.
- * magick/pixel_cache.c (OpenCache): Use unsigned 64-bit value to
- store CacheInfo offset and length as well as for the total pixels
- calculation. Add some more arithmetic overflow detections.
+ * magick/constitute.c (WriteImage): Don't over-write time-stamp
+ when output is to INFO format.
- * coders/topol.c (ReadTOPOLImage): Report a corrupt image
- exception "Unexpected end-of-file" if reader encounters end of
- file while reading header rows. Addresses oss-fuzz 7981
- "graphicsmagick/coder_TOPOL_fuzzer: Use-of-uninitialized-value in
- InsertRow". (Credit to OSS-Fuzz)
+2020-01-03 Fojtik Jaroslav <JaFojtik@seznam.cz>
- * coders/mat.c (ReadMATImage): Report a corrupt image exception
- "Unexpected end-of-file" if reader encounters end of file while
- reading scanlines. Also added some helpful traces. Hopefully
- addresses oss-fuzz 13445 "graphicsmagick/coder_MAT_fuzzer:
- Use-of-uninitialized-value in IsGrayImage". (Credit to OSS-Fuzz)
+ * VisualMagick\configure\configure.exe: Should not depend on mfcr90.dll.
+ It is too bad when end user cannot run this tool because of missing DLL.
-2019-02-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * VisualMagick\configure\configure.cpp Make speed optimisation as default
+ option.
- * magick/image.h ("C"): Include as "magick/image-private.h" as the
- other headers are.
- ("C"): Include "magick/image-private.h" inside the protective
- MAGICK_IMPLEMENTATION guard, as it should have been. This error
- broke the oss-fuzz build.
+ * VisualMagick\configure\configure.vcproj Give different filename to debug
+ build to avoid accidental committing debug build to repository.
-2019-02-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- * magick/image-private.h (_ImageExtra): Put ImageExtra definition
- in a private header file so that its definition may be accessed
- directly by library internals. Add some accessor macros to
- provide access and update code to use them.
+ * coders/dpx.c (GenerateDPXTimeStamp): Use reentrant localtime_r()
+ function if it is available.
- * coders/wpg.c (ReallocColormap): Make sure that there is not a
- heap overwrite if the number of colors has been reduced. Thanks
- to Jaroslav Fojtik for giving me a heads up about this.
+ * magick/log.c (LogMagickEventList): Use reentrant
+ localtime_r() function if it is available.
-2019-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/cineon.c (GenerateCineonTimeStamp): Use reentrant
+ localtime_r() function if it is available.
- * magick/monitor.c (MagickMonitorActive): Add new private function
- to test if a progress monitor is active. Update all progress
- monitor code in loops to use this information, while also updating
- code to hopefully address concerns expressed by Hongxu Chen about
- data races on the graphicsmagick-bugs mailing list starting on
- February 6, 2019.
-
-2019-02-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/mpc.c (ReadMPCImage): Tally directory length to avoid
- death by strlen().
-
- * coders/miff.c (ReadMIFFImage): Tally directory length to avoid
- death by strlen(). Fixes oss-fuzz 13190
- "graphicsmagick/coder_MIFF_fuzzer: Timeout in
- graphicsmagick_coder_MIFF_fuzzer". (Credit to OSS-Fuzz)
-
-2019-02-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/svg.c (ReadSVGImage): Don't call xmlCleanupParser()
- in module code since this may cause other libxml users to fail.
+ * coders/mat.c (WriteMATLABImage): Use reentrant localtime_r()
+ function if it is available.
- * coders/msl.c (ProcessMSLScript): Don't call xmlCleanupParser()
- in module code since this may cause other libxml users to fail.
-
- * magick/render.c (DrawDashPolygon): (DrawDashPolygon): Don't read
- beyond end of dash pattern array. This is a second instance of
- issue identified by SourceForge issue #591. Fixes oss-fuzz 13160
- "graphicsmagick/coder_MVG_fuzzer: Heap-buffer-overflow in
- DrawDashPolygon". The earlier attempt to fix this problem today
- broke dash patterns entirely. (Credit to OSS-Fuzz)
-
- * magick/annotate.c (RenderFreetype): Eliminate memory leak of
- GlyphInfo.image (type FT_Glyph) while rendering some FreeType
- fonts such as the one we use now in the Magick++ test suite.
-
-2019-02-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/render.c (DrawDashPolygon): Avoid reading one beyond
- length of dash pattern array, which is terminated by value 0.0.
- Fixes SourceForge issue #591 "Heap buffer overflow in
- DrawDashPolygon when parsing SVG images".
- (DrawPrimitive): Add arithmetic overflow checks when converting
- computed coordinates from 'double' to 'long'.
- (DrawImage): Don't destroy draw_info in graphic_context when
- draw_info has not been allocated yet. Problem reported via email
- by Sami Supperi on Thu, 14 Feb 2019.
-
- * coders/jpeg.c (ReadJPEGImage): JPEG files are observed to
- provide compression ratios as high as 2500 so allow for that.
- Also, the test for "Unreasonable dimensions" delivered yesterday
- was flawed since magick_rows and magick_columns are only set if a
- desired image size was provided. Fixes SourceForge issue 592
- "Non-malicious JPEG file fails with "Unreasonable dimensions"".
-
- * coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
- for images where photometic is PHOTOMETRIC_RGB. Fixes oss-fuzz
- 13115 "graphicsmagick/coder_PTIF_fuzzer:
- Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
- OSS-Fuzz)
+ * coders/pdf.c (WritePDFImage): Use reentrant localtime_r()
+ function if it is available.
-2019-02-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/ps.c (WritePSImage): Use reentrant ctime_r() function
+ if it is available.
- * coders/jpeg.c (ReadJPEGImage): Base test for "Unreasonable
- dimensions" on original JPEG dimensions and not the scaled
- dimensions. Fixes SourceForge issue 593 "gm convert: Insufficient
- image data in file when hinting input image".
-
-2019-02-13 Troy Patteson <troyp@ieee.org>
+ * coders/ps2.c (WritePS2Image): Use reentrant ctime_r() function
+ if it is available.
- * PerlMagick/Magick.xs (Mogrify): Add decorate argument to Annotate.
+ * coders/ps3.c (WritePS3Image): Use reentrant ctime_r() function
+ if it is available.
- * PerlMagick/Magick.xs (Mogrify): Remove reference to undefined
- Annotate argument.
+ * configure.ac: Test for getpwnam_r().
-2019-02-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * magick/utility.c (ExpandFilename): Use reentrant getpwnam_r()
+ function if it is available.
- * coders/tiff.c (ReadTIFFImage): For planar TIFF, make sure that
- pixels are initialized in case some planes are missing. Fixes
- oss-fuzz 13046 "graphicsmagick/coder_PTIF_fuzzer:
- Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
- OSS-Fuzz)
+ * magick/magick.c (InitializeMagickSignalHandlers): Use the normal
+ termination signal handler for SIGXCPU and SIGXFSZ so that ulimit
+ or setrlimit(2) may be used to apply CPU (RLIMIT_CPU) and output
+ file size (RLIMIT_FSIZE) limits with the normal cleanup, and
+ without dumping core. Note that any output files currently being
+ written may be truncated and files being written by external
+ programs (e.g. Ghostscript) might be left behind unless they are
+ to a temporary file assigned by GraphicsMagick.
-2019-02-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/xpm.c (ReadXPMImage): Promote a color-lookup
+ warning to an error.
- * coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
- returning. Similar to ImageMagick CVE-2019-7397 "In ImageMagick
- before 7.0.8-25, several memory leaks exist in WritePDFImage in
- coders/pdf.c.". Thanks to Petr Gajdos for bringing this issue to
- our attention.
+ * coders/xc.c (ReadXCImage): Promote a color-lookup
+ warning to an error.
-2019-02-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/null.c (ReadNULLImage): Promote a color-lookup
+ warning to an error.
- * coders/wpg.c (ReadWPGImage): Use a different way to reallocate
- the colormap which preserves existing content, but also updates
- image->colors and assures that added palette entries are
- initialized.
+ * Makefile.am: Rotate ChangeLogs for the new year.
- * coders/png.c (ReadMNGImage): Bound maximum loop iterations by
- subrange as a primitive means of limiting resource consumption.
- This should finally resolve oss-fuzz 12738
- "graphicsmagick/enhance_fuzzer: Out-of-memory in
- graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)
-
- * coders/tiff.c (ReadTIFFImage): Assure that opacity channel is
- initialized in the RGBAStrippedMethod case. Convert
- 'CorruptImageError' encountered while testing for more frames to
- 'CorruptImageWarning' so we return the frames already read.
- Second try at fixing oss-fuzz 11896
- "graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
- VerticalFilter".
-
- * coders/dpx.c (AttributeToString): Eliminate clang
- "-Wstring-plus-int" warning observed in oss-fuzz build.
-
- * coders/cineon.c (AttributeToString): Eliminate clang
- "-Wstring-plus-int" warning observed in oss-fuzz build.
-
-2019-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/pict.c (DecodeImage): Avoide a one-byte over-read of
- pixels heap allocation. The cause of the over-read is not yet
- understood. Fixes oss-fuzz 12019
- "graphicsmagick/coder_PICT_fuzzer: Heap-buffer-overflow in
- ExpandBuffer". (Credit to OSS-Fuzz)
-
- * coders/wpg.c (ReadWPGImage): Assure that all colormap entries
- are initialized. Fixes oss-fuzz 12614
- "graphicsmagick/enhance_fuzzer: Use-of-uninitialized-value in
- EnhanceImage". (Credit to OSS-Fuzz)
-
- * coders/tiff.c (ReadTIFFImage): Make sure that image is in
- DirectClass mode and ignore any claimed colormap when the image is
- read using the RGBAStrippedMethod, RGBATiledMethod, or
- RGBAPuntMethod cases. Fixes oss-fuzz 12195
- "graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
- ExportGrayQuantumType". (Credit to OSS-Fuzz)
-
- * coders/miff.c (ReadMIFFImage): Improve pixel buffer calculations
- to defend against overflow. Assure that zlib and bzlib decode the
- expected number of bytes for a pixel row. Fixes oss-fuzz issue
- 12448 "graphicsmagick/coder_MIFF_fuzzer:
- Use-of-uninitialized-value in RGBTransformPackets". (Credit to
- OSS-Fuzz)
-
-2019-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/png.c (ReadMNGImage): Quit processing and report error
- upon failure to insert MNG background layer. Fixes oss-fuzz 12738
- "graphicsmagick/enhance_fuzzer: Out-of-memory in
- graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)
-
-2019-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/dib.c (ReadDIBImage, WriteDIBImage): Improve buffer-size
- calculations to guard against buffer overflows. The reader
- version was not as complete as it should have been, whereas the
- writer version did not guard against arithmetic overflow at all.
-
- * coders/bmp.c (ReadBMPImage, WriteBMPImage): Improve buffer-size
- calculations to guard against buffer overflows. This is a
- follow-on fix to the previous fix submitted for SourceForge issue
- #582 "heap-buffer-overflow in ReadBMPImage of bmp.c" which is now
- also identified as CVE-2018-20185.
-
- * www/Hg.rst: Updates to reflect current usage and availability.
-
- * www/authors.rst: Promote Troy Patteson to the active contributor
- category.
-
-2019-02-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/version.h.in: Rotate ChangeLog and update copyright
- statements for the new year.
-
-2019-01-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
- support WebP 'use_sharp_yuv' option ("if needed, use sharp (and
- slow) RGB->YUV conversion") via `-define webp:use-sharp-yuv=true`.
-
-2019-01-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * magick/pixel_cache.c (SetNexus): Merge IsNexusInCore()
- implementation code into SetNexus() and add check for if
- cache_info->pixels is null. Fixes SourceForge issue #588 "Bug in
- IsNexusInCore()".
-
- * configure.ac (DcrawExtraOptions): Request TIFF output from dcraw
- if build supports TIFF format in order to obtain more metadata.
- This allows obtaining some metadata from standard TIFF tags
- (e.g. camera make, model, and dcraw version), and any attached ICC
- profile, but not specifically EXIF data since we don't support
- extracting EXIF data from TIFF yet. Inspired by SourceForge issue
- 589 "Identify lack of data (no Exif) in RAW formats".
+ * coders/gradient.c (ReadGRADIENTImage): Promote a color-lookup
+ warning to an error.
--- /dev/null
+2019-12-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/gradient.c (ReadGRADIENTImage): QueryColorDatabase() only
+ throws a warning so allow the warning to propagate to the user
+ rather than failing to report a useful message at all.
+
+2019-12-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/gradient.c (GradientImage): OpenMP portability requires
+ that loop variable be signed.
+
+2019-12-30 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ * magick/gradient.c: Visual studio does not compile file without
+ this fix.
+
+2019-12-30 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ * VisualMagick\configure\configure.cpp Add option for speed optimisation
+ to achieve better performance.
+
+2019-12-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/version.h.in: Bump copyright years.
+
+ * magick/image.c (DisplayImages): Fix return status. Was
+ returning inverted return status.
+
+ * coders/gradient.c (ReadGRADIENTImage): Support the
+ "gradient:direction" definition to produce produce additional
+ gradient vector directions corresponding to South, North, West,
+ East, NorthWest, NorthEast, SouthWest, and SouthEast. This
+ support is similar to a useful feature added in ImageMagick
+ 6.9.2.5 although there is no claim that the results are identical,
+ even if the resulting images appear to be visually
+ indistinguishable.
+
+ * magick/gradient.c (GradientImage): Add support for using the
+ image 'gravity' attribute to produce additional gradient vector
+ directions corresponding to SouthGravity (the previously-existing
+ default), NorthGravity, WestGravity, EastGravity,
+ NorthWestGravity, NorthEastGravity, SouthWestGravity, and
+ SouthEastGravity. Gradient images are updated to be PseudoClass
+ (color-mapped), if possible.
+
+2019-12-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/gradient.c (GradientImage): Output PseudoClass images if
+ we can.
+
+ * coders/pcx.c (WritePCXImage): Fix heap overflow in PCX writer
+ when bytes per line value overflows its 16-bit storage unit.
+ Fixes SourceForge bug #619 "heap-buffer-overflow in WritePCXImage"
+ reported by Suhwan Song.
+
+ * magick/gradient.c (GradientImage): Gradient levels were still
+ not spot-on. Now they are. Unfortunately, this necessitated
+ re-generating reference test images based on gradient since the
+ gradient output has changed a little bit more than the test error
+ margins allow.
+
+2019-12-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawImage): Test gradient image resource limits
+ using the proper API.
+
+ * magick/resource.c (ResourceInfinity): Fix definition of
+ ResourceInfinity. Due to parenthesis in the wrong place, the
+ defined value was -1 rather than the maximum range value. The
+ effect of this is that GetMagickResource() would return -1 rather
+ than the maximum range value for the return type as documented.
+ Regression was added on Saturday, March 09, 2019 in the 1.3.32
+ release via changeset 15927:a5318823758c.
+
+ * tests/rwfile.c (main): Allow Ghostscript supported formats to be
+ a bit lossy.
+
+ * tests/rwblob.c (main): Allow Ghostscript supported formats to be
+ a bit lossy.
+
+ * magick/gradient.c (GradientImage): Compute blending alpha with
+ double precision for more precision.
+
+2019-12-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * NEWS.txt: Updates in preparation for 1.3.34 release.
+
+2019-12-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * NEWS.txt: Update with changes since the last GM release.
+
+ * coders/png.c (png_read_raw_profile): Use size_t type to store
+ profile length and 'nibbles'. Use safer way to test for profile
+ buffer overflow.
+ (ReadOnePNGImage): Use size_t type to store 'ping_rowbytes',
+ 'length', and 'row_offset'. Check png_pixels allocation for
+ arithemetic overflow when computing the required allocation size.
+
+ * coders/tiff.c (WriteNewsProfile): Use size_t type to store
+ profile length.
+
+ * coders/pict.c (WritePICTImage): Avoid 'alloc-size-larger-than'
+ warning from GCC when allocating row_bytes.
+
+2019-12-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tiff/libtiff/tiffconf.h: Add standard/common libtiff 'SUPPORT'
+ options which are used in full-fledged Autoconf/Cmake libtiff
+ builds but were missing from the Visual C template file. In
+ particular, WebP is now supported and JBIG is somewhat supported.
+
+ * VisualMagick/jbig/libjbig/LIBRARY.txt (EXCLUDE): Remove
+ tstcodec85.c from JBIG library build.
+
+ * VisualMagick/configure/configure.cpp: Add JBIG library to
+ include path when building libraries. Add WebP as a dependency
+ when building libtiff.
+
+2019-12-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/nt_base.h ("C"): Assume that float versions of functions
+ became available in Visual Studio 2008.
+
+2019-12-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/log.c (InitializeLogInfo): Using the compiled-in
+ defaults, always log to stderr by default, even under Microsoft
+ Windows. The logging output may then be diverted to
+ 'win32eventlog' as soon as a log.mgk file is loaded if that is
+ desired. This should not be much of a problem because loading a
+ log.mgk file is the first thing that the library attempts to do.
+ This change is made due to users and developers being baffled at
+ not seeing any log output due to the log output going to the (very
+ unfriendly) Windows application log.
+
+ * webp: libwebp is updated to the 1.0.3 release.
+
+2019-12-15 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ * magick/nt_base.c Fix user only installation of Ghostscript.
+
+2019-12-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * rungm.sh.in (DIRSEP): DIRSEP should always use Unix conventions for
+ Autotools-based builds.
+
+ * magick/module.h ("C"): Eliminiate redundant and conflicting
+ ListModuleInfo() prototype.
+
+ * coders/miff.c (ReadMIFFImage): Eliminate warnings in trace
+ statements.
+
+ * coders/dib.c (DecodeImage): Eliminate warnings in trace
+ statements.
+
+ * coders/bmp.c (DecodeImage): Eliminate warnings in trace
+ statements.
+
+ * magick/studio.h (SupportMagickModules): Fix the preprocessor
+ logic controlling SupportMagickModules, which became broken for
+ GCC MinGW-based builds starting in the 1.3.29 release when a
+ "static" module loader was implemented. Due to an error in the
+ preprocessor logic, only the "modules" based build was working for
+ MinGW. Much thanks to Giovanni Remigi for making us aware of this
+ issue.
+
+2019-12-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pict.c (WritePICTImage): Throw a writer exception if the
+ PICT width limit is exceeded. Fixes SourceForge issue 617
+ "heap-buffer-overflow in function EncodeImage of coders/pict.c".
+
+2019-12-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * jbig: jbigkit is updated to 2.1 release.
+
+ * libxml: libxml2 is updated to 2.9.10 release.
+
+ * bzlib: bzip is updated to 1.0.8 release.
+
+ * zlib: zlib is updated to 1.2.11 release.
+
+ * png: libpng is updated to 1.6.37 release.
+
+2019-12-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * lcms: lcms2 is updated to 2.9 release.
+
+ * tiff: libtiff is updated to 4.1.0 release.
+
+2019-11-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawPatternPath): Don't leak memory if
+ fill_pattern or stroke_pattern of cloned draw_info are not null.
+ Fixes oss-fuzz issue 18948 "graphicsmagick:coder_MVG_fuzzer:
+ Indirect-leak in CloneImage".
+ (PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
+ memory.
+
+2019-11-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
+ 17986 "graphicsmagick:coder_JPG_fuzzer: Heap-buffer-overflow in
+ GenerateEXIFAttribute". This problem likely only happens in
+ 32-bit builds.
+
+2019-11-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (ReadMNGImage): Only magnify the image if the
+ requested magnification methods are supported.
+
+2019-11-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/compress.c (HuffmanDecodeImage): Fix signed overflow on
+ range check which leads to heap overflow in 32-bit
+ applications. Requires a relatively large file input compared with
+ typical fuzzer files (greater than a megabyte) to trigger.
+ Problem reported to the graphicsmagick-security mail address by
+ Justin Tripp on 2019-11-13.
+ (Ascii85Tuple): Fix thread safety issue by requiring caller to
+ pass in tuple buffer as an argument and having callers allocate
+ tuple buffer on the stack.
+
+2019-11-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/bit_stream.c: Add restrict declarations to slightly
+ improve performance and decrease code size.
+
+ * TclMagick/pkgIndex.tcl: Incorporate recommendations from third
+ problem noted in SourceForge issue #420 "TclMagick issues and
+ patch". This is supposed to help support using an uninstalled
+ GraphicsMagick and allow the installation path to contain a space.
+
+ * wand/magick_wand.c (MagickClearException): Destroy any existing
+ exception info before re-initializing the exception info or else
+ there will be a memory leak.
+
+ * TclMagick/generic/libttkcommon.c (myMagickError): Clear
+ exception from the Wand after it has been reported. Addresses the
+ fourth problem noted by SourceForge issue #420 "TclMagick issues
+ and patch". However, MagickClearException() already clears an
+ exception in the Wand, so a new function is not needed.
+
+ * TclMagick/unix/m4/tcl.m4: Change hard-coded INSTALL path to
+ point to config/install-sh. Re-generated/updated Autotools stuff
+ by executing the genconf.sh script. Addresses the first problem
+ noted by SourceForge issue #420 "TclMagick issues and patch".
+
+2019-11-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (SetNexus): Eliminate warning about
+ possibly uninitialized variable from primordial GCC 3.4.3.
+
+ * magick/render.c (ConvertPrimitiveToPath): Eliminate warning that
+ IsClosedSubPath might be used uninitialized.
+
+ * magick/common.h ("MAGICK_FALLTHROUGH"): Added a
+ MAGICK_FALLTHROUGH macro to support the GCC/Clang fallthrough
+ attribute when the time comes again that it would be useful.
+
+2019-10-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pcx.c (ReadPCXImage): Verify that pixel region is not
+ negative. Assure that opacity channel is initialized to
+ opaqueOpacity. Update DirectClass representation while
+ PseudoClass representation is updated. Improve read performance
+ with uncompressed PCX.
+
+2019-10-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/xpm.c (ReadXPMImage): Image properties are expected to
+ appear within the first 512 bytes of the XPM file header. fixes
+ oss-fuzz 18267 "graphicsmagick:coder_PICON_fuzzer: Timeout in
+ coder_PICON_fuzzer".
+
+2019-10-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: Fix tcmalloc configuration report.
+
+2019-10-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/wpg.c (ReadWPGImage): Implement subimage/subrange
+ support.
+
+ * coders/mat.c (ReadMATImage, ReadMATImageV4): Implement
+ subimage/subrange support. Should resolve oss-fuzz 14999
+ "graphicsmagick/coder_MAT_fuzzer: Out-of-memory in
+ graphicsmagick_coder_MAT_fuzzer".
+
+ * coders/tiff.c (TIFFMapBlob): Fix compile problem if
+ LOG_TIFF_BLOB_IO is defined.
+
+ * coders/wpg.c (ExtractPostscript): Improve performance. Avoid
+ temporary files if possible. Avoid additional memory allocations
+ if possible. Should address oss-fuzz issue 18173
+ "graphicsmagick:enhance_fuzzer: Timeout in enhance_fuzzer" and
+ oss-fuzz issue 17714 "graphicsmagick:coder_WPG_fuzzer: Timeout in
+ coder_WPG_fuzzer".
+
+2019-10-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pnm.c (PNMInteger): Place a generous arbitrary limit on
+ the amount of PNM comment text to avoid denial of service
+ opportunity. Fixes oss-fuzz 18162 "Timeout · coder_PNM_fuzzer".
+
+2019-10-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/dps.c (ReadDPSImage): Fix memory leak when OpenBlob()
+ reports failure. Same as ImageMagick CVE CVE-2019-16709.
+
+2019-09-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/attribute.c (GenerateEXIFAttribute): Skip
+ unsupported/invalid format 0. Fixes oss-fuzz issue 17597
+ "graphicsmagick:coder_SFW_fuzzer: Heap-buffer-overflow in
+ GenerateEXIFAttribute".
+
+2019-09-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * fuzzing/oss-fuzz-build.sh: Change by Alex Gaynor so that the
+ correct oss-fuzz fuzzing engine should be used.
+
+2019-09-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/static.c (OpenModule): Static module loader should use
+ upper-cased magick string when searching for a module alias.
+ Fixes SourceForge issue #613 "static module loader is still
+ case-sensitive".
+
+2019-09-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: Report status of zstd (FaceBook Zstandard)
+ compression in configuration summary.
+
+2019-09-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (TraceArcPath): Substitute a lineto command when
+ tracing arc is impossible. Fixes oss-fuzz 10765
+ "graphicsmagick/coder_MVG_fuzzer: Divide-by-zero in TraceArcPath".
+
+2019-09-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (png_read_raw_profile): Fix validation of raw
+ profile length. Fixes oss-fuzz 16906
+ "graphicsmagick:coder_ICO_fuzzer: Out-of-memory in
+ graphicsmagick_coder_ICO_fuzzer".
+
+ * coders/wpg.c (ReallocColormap): Avoid dereferencing a null
+ pointer if image->colormap is null. Fixes oss-fuzz 17004
+ "graphicsmagick:coder_WPG_fuzzer: Null-dereference READ in
+ ReallocColormap".
+
+2019-09-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/memory.c (MagickRealloc): Add a note that the behavior of
+ this function is as described for BSD reallocf(3), which is now
+ appearing in Linux's GNU libc and elsewhere.
+
+2019-09-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * www/OpenMP.rst: Document the significant OpenMP speed-up which
+ may be obtained by using an alternate memory allocation library.
+ Currently 'tcmalloc', 'mtmalloc', and 'umem' are supported as
+ options.
+
+ * www/INSTALL-unix.rst: Document new --with-tcmalloc option to
+ enable using Google gperftools tcmalloc library.
+
+ * configure.ac: Add support for using Google gperftools tcmalloc
+ library via the --with-tcmalloc option.
+
+ * scripts/rst2htmldeco.py: Port to Python 3 syntax and require at
+ least Python 2.6.
+
+ * scripts/relpath.py: Port to Python 3 syntax and require
+ at least Python 2.6.
+
+ * scripts/html_fragments.py: Port to Python 3 syntax and require
+ at least Python 2.6.
+
+ * scripts/format_c_api_doc.py: Port to Python 3 syntax and require
+ at least Python 2.6.
+
+2019-08-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * doc/GraphicsMagick.imdoc: Document gm utility exit status codes.
+
+2019-08-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (PRIMITIVE_INFO_POINTS_MAX): SIZE_MAX apparently
+ rounds up by one when cast to a double on 64-bit systems. Due to
+ this, and in order to set more rational implementation limits, add
+ a PRIMITIVE_INFO_POINTS_MAX definition which computes and
+ constrains the maximum number of PrimitiveInfo entries allowed.
+
+2019-08-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/attribute.c (GenerateEXIFAttribute): Check that we are
+ not being directed to read an IFD that we are already parsing and
+ quit in order to avoid a loop. Addresses oss-fuzz 15753
+ "graphicsmagick/coder_JPEG_fuzzer: Timeout in
+ graphicsmagick_coder_JPEG_fuzzer" and 16068
+ "graphicsmagick/coder_SFW_fuzzer: Timeout in
+ graphicsmagick_coder_SFW_fuzzer".
+
+ * tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
+ irritating GCC 9 "__builtin_strncpy' output may be truncated"
+ warnings due to copying MaxTextExtent-1 characters. Instead
+ request copying all of the characters and also assure that string
+ is still null terminated.
+
+ * doc/environment.imdoc: Update documentation pertaining to HOME
+ and MAGICK_DEBUG environment variables.
+
+2019-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/log.c (DestroyLogInfo): Only output text to terminate an
+ XML format log file if XML format is active.
+
+2019-08-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (ExtractTokensBetweenPushPop): Previous fix for
+ non-terminal loop was broken by a last-minute untested edit.
+ Finally addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer:
+ Timeout in graphicsmagick_coder_MVG_fuzzer".
+
+2019-08-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * fuzzing/utils.cc (MemoryResource): Lessen the memory limit used
+ for oss-fuzz testing in order to provide more headroom and margin
+ for error.
+
+ * magick/render.c (TraceBezier): Detect arithmetic overflow and
+ return errors via normal error path rather than exiting. Fixes
+ oss-fuzz 16450 "graphicsmagick:coder_MVG_fuzzer: Unexpected-exit
+ in DefaultFatalErrorHandler".
+ (PrimitiveInfoRealloc): Implement more paranoid code related to
+ primitive allocation.
+
+2019-08-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawStrokePolygon): Handle case where
+ TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
+ "graphicsmagick/coder_MVG_fuzzer: ASSERT: primitive_info !=
+ (PrimitiveInfo *) NULL".
+ (DrawDashPolygon): Handle case where DrawStrokePolygon() returns
+ MagickFail. Also needed to address oss-fuzz 15516, since otherwise
+ test-cases run for a very long time.
+ (ExtractTokensBetweenPushPop): Fix non-terminal parsing loop.
+ Addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer: Timeout
+ in graphicsmagick_coder_MVG_fuzzer".
+
+2019-08-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/memory.h (MagickMallocAlignedArray): Add function
+ attributes for added value and to quench GCC 9 warning with
+ special build options enabled.
+
+ * magick/deprecate.h (AcquireMemory): Add more function attributes
+ to quench GCC 9 warning with special build options enabled.
+
+ * magick/attribute.c (GenerateEXIFAttribute): Fix compilation
+ warning in 32-bit build.
+
+ * coders/dpx.c (AttributeToString): Eliminate annoying warnings
+ from GCC 9, although the code was correct.
+
+ * coders/msl.c (MSLStartElement): Fix defective opacity percentage
+ code revealed by GCC 9 warning.
+
+2019-08-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (ReadMNGImage): Skip coalescing layers if there is
+ only one layer. Fixes oss-fuzz 16274
+ "graphicsmagick/coder_MNG_fuzzer: Unexpected-exit in
+ DefaultFatalErrorHandler".
+
+2019-08-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (ReadPNGImage): Post-processing to convert the
+ image type in the PNG reader based on a specified magick prefix
+ string is now disabled. This can (and should) be done after the
+ image has been returned. Fixes oss-fuzz 16386
+ "graphicsmagick:coder_PNG8_fuzzer: Timeout in
+ graphicsmagick_coder_PNG8_fuzzer".
+
+2019-07-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * NEWS.txt: Updates in preparation for 1.3.33 release.
+
+2019-07-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * NEWS.txt: Updated NEWS to reflect updates since last release.
+
+2019-07-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (WriteOnePNGImage): Fix saving to palette when
+ image has an alpha channel but no color is marked as transparent.
+ Patch submitted by Przemysław Sobala via SourceForge patch #61
+ "WriteOnePNGImage(): Fix saving to palette when image has an alpha
+ channel but no color is marked as transparent".
+
+ * doc/options.imdoc (characters): Fix -format documentation to
+ reflect that '%r' returns the image type. Patch submitted by
+ Przemysław Sobala via SourceForge patch #60 "Fix documentation
+ typo".
+
+2019-07-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/tempfile.c (AcquireTemporaryFileDescriptor): Fix
+ compilation under Cygwin. Patch by Marco Atzeri and submitted via
+ email to the graphicsmagick-help mailing list on Fri, 5 Jul 2019.
+
+2019-06-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/attribute.c (GenerateEXIFAttribute): Added range checks
+ and tracing. Fixes oss-fuzz 14998
+ "graphicsmagick/coder_JPEG_fuzzer: Heap-buffer-overflow in
+ Read32s". This is a tiny read overflow.
+
+ * coders/miff.c (ReadMIFFImage): Similar fix as to mpc.c
+
+ * coders/mpc.c (ReadMPCImage): Fix faulty signed overflow logic
+ for profiles[i].length which still allowed overflow. Fixes
+ oss-fuzz issue 15190 "graphicsmagick/coder_MPC_fuzzer:
+ Out-of-memory in graphicsmagick_coder_MPC_fuzzer".
+
+ * doc/options.imdoc: Add notes about security hazards due to
+ commands which support a '@filename' syntax.
+
+ * www/security.rst: Add notes about security hazards due to
+ commands which support a '@filename' syntax.
+
+2019-06-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawImage): Assure that 'token' is initialized.
+ Fixes oss-fuzz issue 14897 "graphicsmagick/coder_MVG_fuzzer:
+ Use-of-uninitialized-value in DrawImage".
+
+ * magick/animate.c (MagickXAnimateImages): Fix memory leak of
+ scene_info.pixels.
+
+ * magick/display.c (MagickXDisplayImage): Fix heap overwrite of
+ windows->image.name and windows->image.icon_name buffers. It
+ appears that the code assumed that CloneString() would always
+ allocated a string at least MaxTextExtent in size. I assume that
+ this issue has existed for a very long time since CloneString()
+ was re-written many years ago.
+
+ * coders/caption.c (ReadCAPTIONImage): The CAPTION reader did not
+ appear to work at all any more. Now it works again, but still not
+ very well.
+
+ * magick/command.c: Re-implement '@' file inclusion support for
+ -comment, -draw, -format, and -label which was removed for the
+ 1.3.32 release. Note that arguments from untrusted sources will
+ still need to be sanitized to detect attempts to subvert this
+ feature to access file data, but this feature has always been
+ supported by GraphicsMagick and it originated early in the
+ development of ImageMagick.
+
+2019-06-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/utility.c (MagickStrlCat, MagickStrlCpy): Add debug
+ checks enabled by MAGICK_STRL_CHECK.
+
+ * magick/montage.c (MontageImages): Fix wrong length argument to
+ strlcat() when building montage directory, which could allow heap
+ overwrite.
+
+ * coders/png.c (RegisterPNGImage): Pass correct size value to
+ strlcat(). Under Apple's OS X (and possibly other targets)
+ strlcat() writes bytes beyond what it needs to (but within the
+ range it is allowed to) causing a crash due to the wrong limit
+ value. Fixes SourceForge issue #609 `gm identify foo.png` crashes
+ on macOS (v 1.3.32).
+
+ * www/Changes.rst: Update ChangeLog links due to new year, and
+ 1.3.32 release.
+
+2019-06-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/bmp.c (WriteBMPImage): Detect arithmetic overflow of
+ image_size. Add more tracing. Reduce compilation warnings.
+ (EncodeImage): Reduce compilation warnings.
+ (WriteBMPImage): Assure that chromaticity uses double-precision
+ for multiply before casting to unsigned integer.
+
+ * coders/wpg.c (ReallocColormap): Reduce compilation warnings.
+
+ * coders/braille.c (WriteBRAILLEImage): Reduce compilation
+ warnings.
+
+ * coders/dib.c (WriteDIBImage): Detect arithmetic overflow of
+ image_size. Reduce compilation warnings.
+ (EncodeImage): Reduce compilation warnings.
+
+ * coders/locale.c (WriteLOCALEImage): Reduce compilation warnings.
+
+2019-06-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * Makefile.am (dist-zstd): Use the maximum possible compression
+ level (22) when creating a Zstd-compressed tarball to get close to
+ lzip/xz compression levels.
+
+ * coders/tiff.c (ReadTIFFImage): Fix typo in initialization of
+ 'tile' pointer variable.
+
+ * version.sh: Updates in preparation for 1.3.32 release.
+
+2019-06-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * Makefile.am (release): Add a release target to make it easier to
+ produce and sign the release files. Add a zstd-compressed output
+ tarball just because we can.
+
+2019-06-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawImage): Fix typo when initializing
+ number_coordinates. Somehow GCC and clang let this typo slip by.
+
+2019-06-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/dib.c (ReadDIBImage): Preserve PseudoClass opaque
+ representation if ICO mask is opaque, otherwise return a
+ DirectClass image.
+
+2019-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawImage): Detect an error in TracePath() and
+ quit rather than forging on.
+
+2019-06-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawImage): Terminate drawing if
+ DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
+ "graphicsmagick/coder_MVG_fuzzer: Timeout in
+ graphicsmagick_coder_MVG_fuzzer".
+ (TracePath): Terminate path parsing upon first parsing error.
+
+2019-06-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/txt.c (ReadTXTImage): Use real a new-line character as
+ line delimiter rather than '\n' string.
+
+ * magick/annotate.c (AnnotateImage): No longer implicitly call
+ TranslateText() since this is not suitable for most use-cases and
+ causes additional performance impact. The API user can perform
+ such translations in advance on the text string using
+ TranslateText() if need be. No longer call StringToList() to
+ split strings into an array of strings since this can lead to
+ unexpected results, and a custom-splitter is more efficient.
+
+2019-06-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawImage): Only support '@filename' syntax to
+ read drawing primitive from a file if we are not already drawing.
+
+ * magick/utility.c (TranslateTextEx): Remove support for reading
+ from a file using '@filename' syntax due to security concerns.
+ Problem was reported to us by "Battle Furry" via the
+ GraphicsMagick security mail alias on June 6, 2019.
+
+2019-06-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/utility.c (SetClientFilename): Reduce initialized data
+ some more.
+
+2019-06-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/nt_base.c: Search for n019003l.pfb (the "Helvetica"-like
+ font) rather than fonts.dir since fonts.dir is not present in all
+ URW font collections.
+
+ * NEWS.txt: Update news.
+
+2019-06-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/logo.c: Tidy logo image definitions, and logo image
+ output.
+
+2019-05-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/mat.c: Make more data const.
+
+2019-05-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/animate.c: Reduce initialized static allocations.
+
+ * magick/display.c: Reduce initialized static allocations.
+
+ * magick/widget.c (MagickSplitNDLTextToList): Add static
+ implementation function.
+
+2019-05-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/webp.c (RegisterWEBPImage): Use sprintf to format version
+ since snprintf is not available in old Visual Studio.
+
+2019-05-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/dcm.c: Make more data const.
+
+ * www/INSTALL-unix.rst: Add documentation for how to install URW
+ fonts from various package management systems.
+
+2019-05-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * www/authors.rst: Add authorship attribution to Samuel Thibault
+ for contributing support for the Braille image format.
+
+ * coders/braille.c: Add support for Braille image format by Samuel
+ Thibault. Patch submitted via SourceForge patch #59 "Add braille
+ image format support.
+
+2019-05-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/tempfile.c: Make more data const.
+
+ * magick/signature.c: Make more data const.
+
+ * magick/quantize.c: Make more data const.
+
+ * magick/attribute.c: Make more data const.
+
+ * coders/png.c: Make more data const.
+
+ * coders/mpeg.c: Make more data const.
+
+ * coders/wmf.c: Make more data const.
+
+ * coders/tile.c: Make more data const.
+
+2019-05-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/enum_strings.c: Make more data const.
+
+2019-05-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/magick.c: Make more data const.
+
+ * magick/type.c (GetTypeInfoByFamily): Make more data const.
+
+ * magick/unix_port.c (MagickGetMMUPageSize): Decrease initialized
+ data.
+
+ * magick/utility.c (GetPageGeometry): Make more data const.
+
+ * coders/pdf.c (WritePDFImage): Allocate working buffer on stack
+ and pass as argument to EscapeParenthesis() to eliminate a thread
+ safety problem and also reduce BSS size.
+
+ * coders/webp.c (RegisterWEBPImage): Fix compiler warning.
+
+ * coders/jbig.c (RegisterJBIGImage): Make more data const.
+
+ * coders/pict.c (DecodeImage): Allocate output buffer used by
+ ExpandBuffer() on the stack rather than as static data private to
+ ExpandBuffer(). Eliminates a thread safety problem and also
+ reduces BSS size.
+
+ * coders/webp.c (RegisterWEBPImage): Reduce BSS size.
+
+2019-05-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/jp2.c: Make more data const.
+
+ * coders/wmf.c: Make more data const.
+
+ * coders/ps.c (WritePSImage): Make more data const.
+
+ * coders/ps2.c (WritePS2Image): Make more data const.
+
+2019-05-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/static.c: Revert to previous 'name' storage. Callback
+ functions in structure block being properly const.
+
+ * coders/xpm.c: Make more data const.
+
+ * coders/pnm.c: Make more data const.
+
+ * coders/palm.c: Make more data const.
+
+ * coders/meta.c: Make more data const.
+
+ * coders/dcraw.c: Make more data const.
+
+ * magick/command.c: Fix compilation problem when HasX11 is not
+ defined.
+
+2019-05-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/command.c: Make more data const.
+
+2019-05-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/webp.c (RegisterWEBPImage): Make more data const.
+
+ * coders/svg.c (RegisterSVGImage): Reduce BSS size.
+
+ * coders/miff.c (RegisterMIFFImage): Fix version reporting.
+
+ * coders/ttf.c (RegisterTTFImage): Fixed reporting of FreeType
+ version.
+
+ * coders/tiff.c (RegisterTIFFImage): Reduce BSS size.
+
+ * coders/sfw.c (ReadSFWImage): Make SFW static data completely
+ const.
+
+ * coders/ps3.c: Make PS3 static data completely const.
+
+ * coders/pict.c: Make PICT static data completely const.
+
+ * magick/error.c (ThrowException, ThrowLoggedException): Handle
+ the case where some passed character strings refer to existing
+ exception character strings. Fixes SourceForge issue #603
+ "heap-use-after-free in function ThrowLoggedException of
+ magick/error.c".
+ (CatchException): Restructure so there is one return point.
+
+ * coders/miff.c (ImportRLEPixels): Fix heap overflow caused by a
+ typo in the code. Also fix undefined behavior caused by large
+ left shifts of an unsigned char. Fixes SourceForge issue #608
+ "heap-buffer-overflow in ImportRLEPixels of coders/miff.c.
+
+2019-05-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/bmp.c (ReadBMPImage): Fix subrange/scene handling in
+ 'ping' mode so it is like the other formats. Only the first frame
+ was being enumerated while in 'ping' mode.
+
+2019-05-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * NEWS.txt: Update news.
+
+ * magick/utility.c (ExpandFilenames): Only expand '@filename' to a
+ list of arguments read from 'filename' if the path '@filename'
+ does not exist. This fix is made based on an email posting to the
+ 'graphicsmagick-help' mailing list at SourceForge by "Test User"
+ on Tue, 7 May 2019.
+
+2019-05-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/colorspace.c: Reorder initialization of colorspace tables
+ for a possible performance improvement.
+
+ * magick/fx.c (WaveImage): Use float for sin map.
+
+ * configure.ac: Test for float versions of math functions.
+
+ * magick/gem.c (GenerateDifferentialNoise): Use float versions of
+ math functions when available.
+
+2019-05-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * www/INSTALL-unix.rst: Expanded configure documentation for
+ --with-modules. Added specific configure documentation for
+ --with-umem and --with-mtmalloc, which may be useful on
+ Solaris-derived systems.
+
+2019-04-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/command.c (VersionCommand): Show OpenMP specification
+ version corresponding to version enumeration.
+
+ * magick/locale.c (GetLocaleMessageFromTag): Eliminate clang
+ warning about comparison with a constant value.
+
+ * magick/log.c (InitializeLogInfo): Initialize LogInfo log_configured.
+
+2019-04-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/magic.c (struct): Ajust StaticMagic definition to be more
+ const-friendly.
+
+ * magick/color_lookup.c (struct): Adjust StaticColors definition
+ to be more const-friendly.
+
+ * magick/attribute.c: Ajust tag_table definition to be more
+ const-friendly.
+
+ * magick/log.c: Allocate LogInfo from heap as we used to do.
+
+ * magick/locale.c (GetLocaleMessageFromTag): Adaptations to locale
+ coder output changes.
+
+ * coders/locale.c (WriteLOCALEImage): Adjust locale coder output
+ to be more const.
+
+2019-04-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/color_lookup.c: Make built-in color tables fully const.
+
+ * magick/animate.c: Use MagickXTextViewWidgetNDL() to display help
+ text.
+
+ * magick/display.c: Use MagickXTextViewWidgetNDL() to display help
+ text.
+
+ * magick/widget.c (MagickXTextViewWidgetNDL): New private function
+ to display multi-line null-delimited text in an X11 widget.
+
+ * coders/xwd.c (ReadXWDImage): Added even more XWD header
+ validation logic. Addresses problems noted by email from Hongxu
+ Chen to the graphicsmagick-security mail alias on Fri, 19 Apr 2019
+ and Sat, 20 Apr 2019 and entitled "Multiple crashes (FPE and
+ invalid read) when processing XWD files".
+
+2019-04-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/xwd.c (ReadXWDImage): Added even more XWD header
+ validation logic. Addresses problems noted by email from Hongxu
+ Chen to the graphicsmagick-security mail alias on Wed, 17 Apr 2019
+ and entitled "Multiple crashes (FPE and invalid read) when
+ processing XWD files". Also addresses additional issues noted
+ that an attacker could request to allocate an arbitrary amount of
+ memory based on ncolors and the claimed header size.
+
+2019-04-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/xwd.c (ReadXWDImage): Add more XWD header validation
+ logic. Addresses problems noted by email from Hongxu Chen to the
+ graphicsmagick-security mail alias on Sun, 14 Apr 2019 and
+ entitled "Multiple crashes (FPE and invalid read) when processing
+ XWD files".
+
+2019-04-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pdb.c (WritePDBImage): Assure that input scanline is
+ cleared in order to cover up some decoder bug. May fix 14215
+ "graphicsmagick/coder_PDB_fuzzer: Use-of-uninitialized-value in
+ WritePDBImage", which I have not been able to reproduce.
+
+ * magick/render.c (DrawPrimitive): Check primitive point x/y
+ values for NaN.
+ (DrawImage): Fix oss-fuzz issue 14173
+ "graphicsmagick/coder_MVG_fuzzer: Integer-overflow in DrawImage".
+
+ * magick/pixel_cache.c (SetNexus): Fix oss-fuzz issue 14208
+ "graphicsmagick/coder_MVG_fuzzer: Integer-overflow in SetNexus".
+
+2019-04-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/display.c: Add even more const declarations.
+
+ * coders/mat.c (WriteMATLABImage): Add completely missing error
+ handling. Fixes SourceForge issue #604 "heap-buffer-overflow in
+ function WriteMATLABImage of coders/mat.c".
+
+2019-04-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
+ "heap-buffer-overflow in function WritePDBImage of coders/pdb.c".
+
+ * magick/widget.c: Add many const declarations.
+
+ * magick/display.c: Incorporate and eliminate display.h. Add many
+ const declarations.
+
+ * magick/animate.c: Incorporate and eliminate animate.h. Add many
+ const declarations.
+
+2019-04-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
+ bounding box. Fixes SourceForge issue #606 "Division by Zero in
+ coders/wmf.c".
+
+2019-04-07 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ * magick/nt_base.c Fix a problem of finding ghostscript fonts.
+ Variable "font_dir" was useless and thus removed. No need to copy
+ text multiple times. Use const char gs_font_dir[] instead of
+ pointer.
+
+2019-04-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/xwd.c (ReadXWDImage): Perform more header validations and
+ a file size validation in order to reject files with bogus
+ headers.
+ (WriteXWDImage): Fix SourceForge issue #599
+ "heap_buffer_overflow_WRITE in function WriteXWDImage of
+ coders/xwd.c".
+
+2019-04-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/svg.c (SVGStartElement): Fix stack buffer overflow while
+ parsing quoted font family value. Fixes SourceForge issue #600
+ "stack-buffer-overflow in function SVGStartElement of
+ coders/svg.c".
+
+ * coders/miff.c (ReadMIFFImage): Detect end of file while reading
+ RLE packets. Fixes SourceForge issue #598 "heap-buffer-overflow
+ in function ReadMIFFImage of coders/miff.c".
+
+2019-04-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
+ reading DirectClass XWD file. Fixes SourceForge issue #597
+ "heap-buffer-overflow in function ReadXWDImage of coders/xwd.c".
+
+2019-04-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (ReadMNGImage): Fix small buffer overflow (one
+ PixelPacket) of image colormap. Fixes SourceForge issue #596
+ "heap-buffer-overflow in function CloneImage of magick/image.c".
+
+ * magick/colormap.c (ReallocateImageColormap): New function to
+ reallocate an image colormap.
+
+ * coders/logo.c: Make more static data const.
+
+ * magick/module_aliases.h: Make more static data const.
+
+ * magick/static.c: Make more static data const.
+
+2019-04-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/log.c (LogMagickEventList): Log elapsed time with
+ microsecond precision.
+
+2019-03-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/mpc.c (ReadMPCImage): Deal with a profile length of zero,
+ or an irrationally large profile length. Fixes SourceForge issue
+ #601 "memory leak in function ReadMPCImage of coders/mpc.c ".
+
+ * magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
+ case that the memory allocation for window->segment_info
+ fails. Fixes SourceForge #595 "use allocate memory before null
+ check" as pertains to magick/xwindow.c.
+
+ * magick/segment.c (Classify): Add check for memory allocation
+ failure when allocating cluster array. Fixes SourceForge #595 "use
+ allocate memory before null check" as pertains to
+ magick/segment.c.
+
+ * coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
+ null check. Fixes SourceForge #595 "use allocate memory before
+ null check" as pertains to coders/pdb.c.
+
+2019-03-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (AllocateThreadViewSet): Simplify the image
+ view model by adding NexusInfo to the View structure (rather than
+ referencing it via a pointer) to lessen the number of required
+ per-thread allocations and to improve locality of reference.
+
+2019-03-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/wpg.c (WPG1_Palette): Change to a static declaration.
+
+ * coders/dcm.c: dicom_info array is now fully in the data segment.
+
+2019-03-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: Add support for using the Solaris mtmalloc
+ library. This is primarily for testing or as an alternative to
+ Solaris umem.
+ Stop using posix_memalign() until it is uniformly more mature and
+ reliably quick.
+
+2019-03-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (SetNexus): Smallest staging-area
+ allocation is cache line size so declare it as such.
+
+ * magick/fx.c: Functions in the fx module which return a new Image
+ should return a null Image if an exception was thrown. Also,
+ assure that user has an opportunity to see the exception which was
+ thrown.
+
+ * magick/error.c (ThrowLoggedException): Throwing an exception is
+ now thread-safe.
+
+ * magick/pixel_cache-private.h: Moved pixel cache private
+ definitions to private header.
+
+2019-03-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (SetNexus): Pass x, y, columns, and rows
+ rather than a pointer to RectangleInfo. This should be easier to
+ inline on modern CPUs.
+
+2019-03-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (SetNexus): Cache resource limits in
+ CacheInfo rather than repeatedly calling into the resource code in
+ order to lessen the overhead of performing resource limit checks
+ on the pixel cache views.
+
+ * magick/resource.c (AcquireMagickResource): Use a lock for each
+ resource in order to lessen contention. Return a maximum 64-bit
+ integer value if the resource has not been limited. Previously
+ returned -1 in this case but this was not documented.
+
+2019-03-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/import.c (ImportViewPixelArea): If range between max and
+ min is less than MagickEpsilon, produce a black image rather than
+ throwing an exception.
+
+ * coders/mat.c (ReadMATImage): Fix memory leak on unexpected end
+ of file. Fixes oss-fuzz 13556 "graphicsmagick/coder_MAT_fuzzer:
+ Direct-leak in ReadMATImage". (Credit to OSS-Fuzz)
+
+2019-03-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/mat.c (ReadMATImage): Quit if image scanlines are not
+ fully populated due to exception. Fixes oss-fuzz 13530
+ "graphicsmagick/coder_MAT_fuzzer: Use-of-uninitialized-value in
+ InsertComplexFloatRow". (Credit to OSS-Fuzz)
+
+2019-03-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/txt.c (ReadTXTImage): Don't start new line if x_max <
+ x_min. Avoids calling SetImagePixels() with a width of zero.
+ Related to oss-fuzz 13521 "graphicsmagick/coder_TEXT_fuzzer:
+ Floating-point-exception in SetNexus". (Credit to OSS-Fuzz)
+
+ * magick/pixel_cache.c (SetNexus): Report error for empty region
+ rather than crashing due to divide by zero exception. This is a
+ new bug due to yesterday's changes. Fixes oss-fuzz 13521
+ "graphicsmagick/coder_TEXT_fuzzer: Floating-point-exception in
+ SetNexus". (Credit to OSS-Fuzz)
+
+2019-03-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * design/pixel-cache.dot: Update design dot diagram to remove
+ IsNexusInCore and add CompositeCacheNexus.
+
+ * magick/pixel_cache.c (SetNexus): Apply resource limits to pixel
+ nexus allocations using the same limits (total pixels, width,
+ height, memory) as applied to the whole image since some requests
+ are directly influenced by the input file. Add yet more tests for
+ arithmetic overflow. Whole source module is re-arranged so that
+ static functions are in order of dependency so that forward
+ prototype declarations are no longer needed. Fixes oss-fuzz 13210
+ "graphicsmagick/coder_MVG_fuzzer: Integer-overflow in
+ SetNexus". (Credit to OSS-Fuzz)
+
+2019-03-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (OpenCache): Use unsigned 64-bit value to
+ store CacheInfo offset and length as well as for the total pixels
+ calculation. Add some more arithmetic overflow detections.
+
+ * coders/topol.c (ReadTOPOLImage): Report a corrupt image
+ exception "Unexpected end-of-file" if reader encounters end of
+ file while reading header rows. Addresses oss-fuzz 7981
+ "graphicsmagick/coder_TOPOL_fuzzer: Use-of-uninitialized-value in
+ InsertRow". (Credit to OSS-Fuzz)
+
+ * coders/mat.c (ReadMATImage): Report a corrupt image exception
+ "Unexpected end-of-file" if reader encounters end of file while
+ reading scanlines. Also added some helpful traces. Hopefully
+ addresses oss-fuzz 13445 "graphicsmagick/coder_MAT_fuzzer:
+ Use-of-uninitialized-value in IsGrayImage". (Credit to OSS-Fuzz)
+
+2019-02-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/image.h ("C"): Include as "magick/image-private.h" as the
+ other headers are.
+ ("C"): Include "magick/image-private.h" inside the protective
+ MAGICK_IMPLEMENTATION guard, as it should have been. This error
+ broke the oss-fuzz build.
+
+2019-02-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/image-private.h (_ImageExtra): Put ImageExtra definition
+ in a private header file so that its definition may be accessed
+ directly by library internals. Add some accessor macros to
+ provide access and update code to use them.
+
+ * coders/wpg.c (ReallocColormap): Make sure that there is not a
+ heap overwrite if the number of colors has been reduced. Thanks
+ to Jaroslav Fojtik for giving me a heads up about this.
+
+2019-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/monitor.c (MagickMonitorActive): Add new private function
+ to test if a progress monitor is active. Update all progress
+ monitor code in loops to use this information, while also updating
+ code to hopefully address concerns expressed by Hongxu Chen about
+ data races on the graphicsmagick-bugs mailing list starting on
+ February 6, 2019.
+
+2019-02-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/mpc.c (ReadMPCImage): Tally directory length to avoid
+ death by strlen().
+
+ * coders/miff.c (ReadMIFFImage): Tally directory length to avoid
+ death by strlen(). Fixes oss-fuzz 13190
+ "graphicsmagick/coder_MIFF_fuzzer: Timeout in
+ graphicsmagick_coder_MIFF_fuzzer". (Credit to OSS-Fuzz)
+
+2019-02-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/svg.c (ReadSVGImage): Don't call xmlCleanupParser()
+ in module code since this may cause other libxml users to fail.
+
+ * coders/msl.c (ProcessMSLScript): Don't call xmlCleanupParser()
+ in module code since this may cause other libxml users to fail.
+
+ * magick/render.c (DrawDashPolygon): (DrawDashPolygon): Don't read
+ beyond end of dash pattern array. This is a second instance of
+ issue identified by SourceForge issue #591. Fixes oss-fuzz 13160
+ "graphicsmagick/coder_MVG_fuzzer: Heap-buffer-overflow in
+ DrawDashPolygon". The earlier attempt to fix this problem today
+ broke dash patterns entirely. (Credit to OSS-Fuzz)
+
+ * magick/annotate.c (RenderFreetype): Eliminate memory leak of
+ GlyphInfo.image (type FT_Glyph) while rendering some FreeType
+ fonts such as the one we use now in the Magick++ test suite.
+
+2019-02-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/render.c (DrawDashPolygon): Avoid reading one beyond
+ length of dash pattern array, which is terminated by value 0.0.
+ Fixes SourceForge issue #591 "Heap buffer overflow in
+ DrawDashPolygon when parsing SVG images".
+ (DrawPrimitive): Add arithmetic overflow checks when converting
+ computed coordinates from 'double' to 'long'.
+ (DrawImage): Don't destroy draw_info in graphic_context when
+ draw_info has not been allocated yet. Problem reported via email
+ by Sami Supperi on Thu, 14 Feb 2019.
+
+ * coders/jpeg.c (ReadJPEGImage): JPEG files are observed to
+ provide compression ratios as high as 2500 so allow for that.
+ Also, the test for "Unreasonable dimensions" delivered yesterday
+ was flawed since magick_rows and magick_columns are only set if a
+ desired image size was provided. Fixes SourceForge issue 592
+ "Non-malicious JPEG file fails with "Unreasonable dimensions"".
+
+ * coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
+ for images where photometic is PHOTOMETRIC_RGB. Fixes oss-fuzz
+ 13115 "graphicsmagick/coder_PTIF_fuzzer:
+ Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
+ OSS-Fuzz)
+
+2019-02-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/jpeg.c (ReadJPEGImage): Base test for "Unreasonable
+ dimensions" on original JPEG dimensions and not the scaled
+ dimensions. Fixes SourceForge issue 593 "gm convert: Insufficient
+ image data in file when hinting input image".
+
+2019-02-13 Troy Patteson <troyp@ieee.org>
+
+ * PerlMagick/Magick.xs (Mogrify): Add decorate argument to Annotate.
+
+ * PerlMagick/Magick.xs (Mogrify): Remove reference to undefined
+ Annotate argument.
+
+2019-02-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/tiff.c (ReadTIFFImage): For planar TIFF, make sure that
+ pixels are initialized in case some planes are missing. Fixes
+ oss-fuzz 13046 "graphicsmagick/coder_PTIF_fuzzer:
+ Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
+ OSS-Fuzz)
+
+2019-02-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
+ returning. Similar to ImageMagick CVE-2019-7397 "In ImageMagick
+ before 7.0.8-25, several memory leaks exist in WritePDFImage in
+ coders/pdf.c.". Thanks to Petr Gajdos for bringing this issue to
+ our attention.
+
+2019-02-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/wpg.c (ReadWPGImage): Use a different way to reallocate
+ the colormap which preserves existing content, but also updates
+ image->colors and assures that added palette entries are
+ initialized.
+
+ * coders/png.c (ReadMNGImage): Bound maximum loop iterations by
+ subrange as a primitive means of limiting resource consumption.
+ This should finally resolve oss-fuzz 12738
+ "graphicsmagick/enhance_fuzzer: Out-of-memory in
+ graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)
+
+ * coders/tiff.c (ReadTIFFImage): Assure that opacity channel is
+ initialized in the RGBAStrippedMethod case. Convert
+ 'CorruptImageError' encountered while testing for more frames to
+ 'CorruptImageWarning' so we return the frames already read.
+ Second try at fixing oss-fuzz 11896
+ "graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
+ VerticalFilter".
+
+ * coders/dpx.c (AttributeToString): Eliminate clang
+ "-Wstring-plus-int" warning observed in oss-fuzz build.
+
+ * coders/cineon.c (AttributeToString): Eliminate clang
+ "-Wstring-plus-int" warning observed in oss-fuzz build.
+
+2019-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/pict.c (DecodeImage): Avoide a one-byte over-read of
+ pixels heap allocation. The cause of the over-read is not yet
+ understood. Fixes oss-fuzz 12019
+ "graphicsmagick/coder_PICT_fuzzer: Heap-buffer-overflow in
+ ExpandBuffer". (Credit to OSS-Fuzz)
+
+ * coders/wpg.c (ReadWPGImage): Assure that all colormap entries
+ are initialized. Fixes oss-fuzz 12614
+ "graphicsmagick/enhance_fuzzer: Use-of-uninitialized-value in
+ EnhanceImage". (Credit to OSS-Fuzz)
+
+ * coders/tiff.c (ReadTIFFImage): Make sure that image is in
+ DirectClass mode and ignore any claimed colormap when the image is
+ read using the RGBAStrippedMethod, RGBATiledMethod, or
+ RGBAPuntMethod cases. Fixes oss-fuzz 12195
+ "graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
+ ExportGrayQuantumType". (Credit to OSS-Fuzz)
+
+ * coders/miff.c (ReadMIFFImage): Improve pixel buffer calculations
+ to defend against overflow. Assure that zlib and bzlib decode the
+ expected number of bytes for a pixel row. Fixes oss-fuzz issue
+ 12448 "graphicsmagick/coder_MIFF_fuzzer:
+ Use-of-uninitialized-value in RGBTransformPackets". (Credit to
+ OSS-Fuzz)
+
+2019-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/png.c (ReadMNGImage): Quit processing and report error
+ upon failure to insert MNG background layer. Fixes oss-fuzz 12738
+ "graphicsmagick/enhance_fuzzer: Out-of-memory in
+ graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)
+
+2019-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/dib.c (ReadDIBImage, WriteDIBImage): Improve buffer-size
+ calculations to guard against buffer overflows. The reader
+ version was not as complete as it should have been, whereas the
+ writer version did not guard against arithmetic overflow at all.
+
+ * coders/bmp.c (ReadBMPImage, WriteBMPImage): Improve buffer-size
+ calculations to guard against buffer overflows. This is a
+ follow-on fix to the previous fix submitted for SourceForge issue
+ #582 "heap-buffer-overflow in ReadBMPImage of bmp.c" which is now
+ also identified as CVE-2018-20185.
+
+ * www/Hg.rst: Updates to reflect current usage and availability.
+
+ * www/authors.rst: Promote Troy Patteson to the active contributor
+ category.
+
+2019-02-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/version.h.in: Rotate ChangeLog and update copyright
+ statements for the new year.
+
+2019-01-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
+ support WebP 'use_sharp_yuv' option ("if needed, use sharp (and
+ slow) RGB->YUV conversion") via `-define webp:use-sharp-yuv=true`.
+
+2019-01-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * magick/pixel_cache.c (SetNexus): Merge IsNexusInCore()
+ implementation code into SetNexus() and add check for if
+ cache_info->pixels is null. Fixes SourceForge issue #588 "Bug in
+ IsNexusInCore()".
+
+ * configure.ac (DcrawExtraOptions): Request TIFF output from dcraw
+ if build supports TIFF format in order to obtain more metadata.
+ This allows obtaining some metadata from standard TIFF tags
+ (e.g. camera make, model, and dcraw version), and any attached ICC
+ profile, but not specifically EXIF data since we don't support
+ extracting EXIF data from TIFF yet. Inspired by SourceForge issue
+ 589 "Identify lack of data (no Exif) in RAW formats".
from ImageMagick Studio's ImageMagick and applied the "MIT" style
license:
- Copyright (C) 2002 - 2019 GraphicsMagick Group
+ Copyright (C) 2002-2020 GraphicsMagick Group
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
// This may look like C code, but it is really -*- C++ -*-
//
-// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
+// Copyright Bob Friesenhahn, 1999-2020
//
// Implementation of Options
//
"Unable to allocate dash-pattern memory");
// Copy elements
- memcpy(_drawInfo->dash_pattern,strokeDashArray_,
- (x+1)*sizeof(double));
+ if (_drawInfo->dash_pattern)
+ memcpy(_drawInfo->dash_pattern,strokeDashArray_,
+ (x+1)*sizeof(double));
}
}
const double* Magick::Options::strokeDashArray ( void ) const
# should want to concatenate them.
CHANGELOGS = \
ChangeLog \
+ ChangeLog.2019 \
ChangeLog.2018 \
ChangeLog.2017 \
ChangeLog.2016 \
#
#
-# Copyright (C) 2004-2019 GraphicsMagick Group
+# Copyright (C) 2004-2020 GraphicsMagick Group
# This program is covered by multiple licenses, which are described in
# Copyright.txt. You should have received a copy of Copyright.txt with this
# should want to concatenate them.
CHANGELOGS = \
ChangeLog \
+ ChangeLog.2019 \
ChangeLog.2018 \
ChangeLog.2017 \
ChangeLog.2016 \
MAGICK_NOINST_HDRS = \
magick/alpha_composite.h \
+ magick/attribute-private.h \
magick/bit_stream.h \
+ magick/color-private.h \
+ magick/color_lookup-private.h \
+ magick/colormap-private.h \
+ magick/command-private.h \
+ magick/constitute-private.h \
+ magick/delegate-private.h \
+ magick/error-private.h \
magick/floats.h \
magick/image-private.h \
magick/locale_c.h \
+ magick/log-private.h \
+ magick/magic-private.h \
+ magick/magick-private.h \
magick/map.h \
+ magick/memory-private.h \
+ magick/module-private.h \
magick/module_aliases.h \
+ magick/monitor-private.h \
magick/nt_base.h \
magick/nt_feature.h \
magick/omp_data_view.h \
magick/pixel_cache-private.h \
magick/prefetch.h \
magick/random-private.h \
+ magick/registry-private.h \
+ magick/render-private.h \
magick/semaphore.h \
magick/spinlock.h \
magick/static.h \
magick/studio.h \
+ magick/tempfile-private.h \
magick/tempfile.h \
+ magick/type-private.h \
magick/unix_port.h \
+ magick/utility-private.h \
magick/widget.h \
magick/xwindow.h
$(WWWDIR)/ChangeLog-2016.html \
$(WWWDIR)/ChangeLog-2017.html \
$(WWWDIR)/ChangeLog-2018.html \
+ $(WWWDIR)/ChangeLog-2019.html \
$(WWWDIR)/Changelog.html \
$(WWWDIR)/Changes.html \
$(WWWDIR)/Copyright.html \
$(WWWDIR)/ChangeLog-2016.html \
$(WWWDIR)/ChangeLog-2017.html \
$(WWWDIR)/ChangeLog-2018.html \
+ $(WWWDIR)/ChangeLog-2019.html \
$(WWWDIR)/Changelog.html \
$(WWWDIR)/Changes.html \
$(WWWDIR)/Copyright.html \
@MAINTAINER_MODE_TRUE@$(top_srcdir)/www/Changelog.rst: $(top_srcdir)/ChangeLog
@MAINTAINER_MODE_TRUE@ $(CHANGELOG2RST) < $^ > $@
+@MAINTAINER_MODE_TRUE@$(top_srcdir)/www/ChangeLog-2019.rst: $(top_srcdir)/ChangeLog.2019
+@MAINTAINER_MODE_TRUE@ $(CHANGELOG2RST) < $^ > $@
+
@MAINTAINER_MODE_TRUE@$(top_srcdir)/www/ChangeLog-2018.rst: $(top_srcdir)/ChangeLog.2018
@MAINTAINER_MODE_TRUE@ $(CHANGELOG2RST) < $^ > $@
GraphicsMagick News
===================
-This file was last updated to reflect changes up to December 24, 2019
+This file was last updated to reflect changes up to February 23, 2020
Please note that this file records news for the associated development
branch and that each development branch has its own NEWS file. See the
.. contents::
:local:
+1.3.35 (February 23, 2020)
+==========================
+
+Special Issues:
+
+* It has been discovered that the 'ICU' library (a perhaps 30MB C++
+ library) which is now often a libxml2 dependendency causes huge
+ process initialization overhead. This is noticed as unexpected
+ slowness when GraphicsMagick utilities are used to process small to
+ medium sized files. The time to initialize the 'ICU' library is
+ often longer than the time that GraphicsMagick would otherwise
+ require to read the input file, process the image, and write the
+ output file. If the 'ICU' dependency can not be avoided, then make
+ sure to use the modules build so there is only impact for file
+ formats which require libxml2. Please lobby the 'ICU' library
+ developers to change their implementation to avoid long start-up
+ times due to merely linking with the library.
+
+Security Fixes:
+
+* GraphicsMagick is now participating in Google's oss-fuzz project due
+ to the contributions and assistance of Alex Gaynor. Since February 4
+ 2018, 398 issues have been opened by oss-fuzz (some of which were
+ benign build issues) and 11 issues remain 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
+ they have been in "New" status for 90 days. There are too many
+ fixes to list here. Please consult the GraphicsMagick ChangeLog
+ file, Mercurial repository commit log, and the oss-fuzz issues list
+ for details.
+
+Bug fixes:
+
+* Fix broken definition of ResourceInfinity which resulted in that
+ GetMagickResource() would return -1 rather than the maximum range
+ value for the return type as documented. (problem added by the
+ 1.3.32 release).
+
+* ModifyCache(): Re-open the pixel cache if the cache rows/columns do
+ not match the owning image rows/columns.
+
+* Fix DisplayImages() return status. The return status was inverted.
+
+* HISTOGRAM: Histogram once again includes the histogram as a text
+ comment. This became broken by previous security fixes.
+
+* PICT: Fixed heap buffer overuns reported multiple sources.
+
+* JNG: Detect when JPEG encoder has failed and throw an exception.
+
+* MVG/DrawImage(): Performs even more parsing validations.
+
+* Clang static analyzer fixes: A great many fixes were made based on
+ problem reports by the Clang static analyzer.
+
+* Visual Studio static analyzer fixes: A great many fixes were made
+ based on problem reports by the Visual Studio 2019 static analyzer.
+ Many of these may improve the robustness of 64-bit code.
+
+New Features:
+
+* GRADIENT/GradientImage(): Improved accuracy of gradient levels as
+ well as dramaticaly improving performance. Output PseudoClass
+ images if we can. Add support for using the image 'gravity'
+ attribute as well as the "gradient:direction" definition to produce
+ gradient vector directions corresponding to SouthGravity (the
+ previously-existing default), NorthGravity, WestGravity,
+ EastGravity, NorthWestGravity, NorthEastGravity, SouthWestGravity,
+ and SouthEastGravity.
+
+API Updates:
+
+* InitializeMagickEx(): New function which may be used in place of
+ InitializeMagick() to initialize GraphicsMagick. This
+ initialization function returns an error status value, may update a
+ passed ExceptionInfo structure with error information, and provides
+ an options parameter which supports simple bit-flags to tailor
+ initialization. The signal handler registrations are skipped if the
+ MAGICK_OPT_NO_SIGNAL_HANDER flag is set in the options.
+
+Feature improvements:
+
+* Replace use of non-reentrant legacy POSIX functions with reentrant
+ equivalents.
+
+* Timing of image reads should now be very accurate. The timer was
+ sometimes not stopped as soon as it should be.
+
+* PICT: The PICT reader is working pretty good now. It handles all
+ the PICT image files I have available to me.
+
+Windows Delegate Updates/Additions:
+
+* None
+
+Build Changes:
+
+* Visual Studio Build: Configure program now provides a checkbox to
+ enable common optimizations for better performance.
+
+Behavior Changes:
+
+* POSIX Signals: Use the normal termination signal handler for SIGXCPU
+ and SIGXFSZ so that ulimit or setrlimit(2) may be used to apply CPU
+ (RLIMIT_CPU) and output file size (RLIMIT_FSIZE) limits with the
+ normal cleanup, and without dumping core. Note that any output files
+ currently being written may be truncated and files being written by
+ external programs (e.g. Ghostscript) might be left behind unless
+ they are to a temporary file assigned by GraphicsMagick.
+
+* Some private string and integer constants were removed from the
+ apparent library ABI. Some private functions were marked static and
+ removed from the apparent library ABI. This is mentioned because
+ someone is sure to notice and be concerned about it.
+
+* The remaining private content in installed header files was moved
+ into -private.h header files which are not installed. This should
+ not be cause for concern but is mentiond because someone is sure to
+ notice and be concerned about it.
+
1.3.34 (December 24, 2019)
==========================
);
# This version identifier must match the package version.
-($VERSION) = '1.3.34' =~ /^([\d.]+)/g;
+($VERSION) = '1.3.35' =~ /^([\d.]+)/g;
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
# Maxium error is ignored since operation depends on floating-point
# sensitive threshold.
#
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Add'/,
'reference/composite/Add.miff',0.004,1.0);
# shape does not appear in the result.
#
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Atop'/,
'reference/composite/Atop.miff',0.0025,0.005);
# The result image shaded by composite image.
#
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Bumpmap'/,
'reference/composite/Bumpmap.miff',0.0025,0.005);
# The result is transparent where composite image obscures the image.
#
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Clear'/,
'reference/composite/Clear.miff',0.0025,0.005);
# The resulting image is image replaced with composite image. The
# matte information is ignored.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Copy'/,
'reference/composite/Copy.miff',0.0025,0.005);
# blue layer in composite image. The other layers are copied
# untouched.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'CopyBlue'/,
'reference/composite/CopyBlue.miff',0.0025,0.005);
# green layer in composite image. The other layers are copied
# untouched.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'CopyGreen'/,
'reference/composite/CopyGreen.miff',0.0025,0.005);
# The resulting image is the red layer in image replaced with the red
# layer in composite image. The other layers are copied untouched.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'CopyRed'/,
'reference/composite/CopyRed.miff',0.0025,0.005);
# opacity layer in composite image. The other layers are copied
# untouched.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'CopyOpacity'/,
'reference/composite/CopyOpacity.miff',0.0025,0.005);
# The result of abs(composite image - image). This is useful for
# comparing two very similar images.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Difference'/,
'reference/composite/Difference.miff',0.0025,0.005);
# differs from over because the portion of composite image outside
# image's shape does not appear in the result.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Dissolve', opacity => '25'/,
- 'reference/composite/Dissolve.miff',0.003,0.007);
+ 'reference/composite/Dissolve.miff',0.003,0.008);
#
# In
# The result is composite image cut by the shape of image. None of
# the image data of image will be in the result.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'In'/,
'reference/composite/In.miff',0.0025,0.005);
# The result of composite image - image, with underflow cropped to
# zero. The matte channel is ignored (set to 255, full coverage).
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Minus'/,
'reference/composite/Minus.miff',0.0025,0.005);
# The result of composite image * image. This is useful for the
# creation of drop-shadows.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Multiply'/,
'reference/composite/Multiply.miff',0.0025,0.005);
# The resulting image is composite image with the shape of image cut
# out.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Out'/,
'reference/composite/Out.miff',0.0025,0.005);
# opaque areas of composite image obscuring image in the
# region of overlap.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Over'/,
'reference/composite/Over.miff',0.0025,0.005);
# cropped to 255 (no overflow). This operation is independent of the
# matte channels.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Plus'/,
'reference/composite/Plus.miff',0.0025,0.005);
# sensitive threshold.
#
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Subtract'/,
'reference/composite/Subtract.miff',0.006,1.0);
# that is outside the overlap region. The overlap region will be
# blank.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Xor'/,
'reference/composite/Xor.miff',0.002,0.005);
#
# The result of composite image / image.
++$test;
-testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
+testCompositeCompare('gradient:black-white',q/size=>"100x80"/,
'input_matte.miff', q//,
q/, gravity=>'Center', compose=>'Divide'/,
'reference/composite/Divide.miff',0.0025,0.02);
#!/usr/local/bin/perl
-# Copyright (C) 2003 - 2016 GraphicsMagick Group
+# Copyright (C) 2003-2019 GraphicsMagick Group
# Copyright (C) 2002 ImageMagick Studio
# Copyright (C) 1991-1999 E. I. du Pont de Nemours and Company
#
print("Gradient (gradual passing from one shade to another) ...\n");
++$test;
testReadCompare('gradient:red-blue', 'reference/read/gradient.miff',
- q/size=>"70x46"/, 0.003, 0.004);
+ q/size=>"256x256"/, 0.003, 0.004);
print("GRANITE (granite texture) ...\n");
++$test;
++$test;
testReadCompare('input_70x46.uyvy', 'reference/read/input_uyvy.miff',
q/size=>"70x46", depth=>8/, 0.006, 0.008);
-
undef $status;
$magick=$image->Get('magick');
$signature=$image->Get('signature');
-
+
if ( $signature ne $ref_signature ) {
print "ReadImage()\n";
- print "Image: $infile, signatures do not match.\n";
- print " Computed: $signature\n";
- print " Expected: $ref_signature\n";
+ print "Image: $infile, signatures do not match.\n";
+ print " Computed: $signature\n";
+ print " Expected: $ref_signature\n";
print " Depth: $depth\n";
++$failure;
defined $ENV{'PERL_DEBUG'} && $image->Display();
print "not ok $test\n";
} else {
print "ok $test\n";
- }
+ }
}
# Create images
$srcimage=Graphics::Magick->new;
- $refimage=Graphics::Magick->new;
+ $refimage=Graphics::Magick->new;
if ( "$read_options" ne "" ) {
eval "\$status=\$srcimage->Set($read_options);";
goto COMPARE_RUNTIME_ERROR;
}
}
-
+
$status=$srcimage->ReadImage("$srcimage_name");
if ("$status")
{
#
sub testReadSized {
my( $infile, $size, $depth, $ref_8, $ref_16, $ref_32 ) = @_;
-
+
my($image,$ref_signature);
if ( !defined( $ref_16 ) )
$signature=$image->Get('signature');
if ( $signature ne $ref_signature ) {
print "ReadImage()\n";
- print "Image: $infile, signatures do not match.\n";
- print " Computed: $signature\n";
- print " Expected: $ref_signature\n";
+ print "Image: $infile, signatures do not match.\n";
+ print " Computed: $signature\n";
+ print " Expected: $ref_signature\n";
print " Depth: $depth\n";
print "not ok $test\n";
defined $ENV{'PERL_DEBUG'} && $image->Display();
#
sub testReadWrite {
my( $infile, $outfile, $writeoptions, $ref_8, $ref_16, $ref_32 ) = @_;
-
+
my($image);
if ( !defined( $ref_16 ) )
$errorinfo='';
$image=Graphics::Magick->new;
- $refimage=Graphics::Magick->new;
+ $refimage=Graphics::Magick->new;
#
# Read the initial image
#
sub testReadWriteNoVerify {
my( $infile, $outfile, $writeoptions) = @_;
-
+
my($image, $images);
-
+
$image=Graphics::Magick->new;
$status=$image->ReadImage("$infile");
if( "$status" ) {
sub testReadWriteSized {
my( $infile, $outfile, $size, $readdepth, $writeoptions, $ref_8, $ref_16,
$ref_32 ) = @_;
-
+
my($image,$depth,$ref_signature);
if ( !defined( $ref_16 ) )
my( $srcimage, $name, $attribute ) = @_;
my($image);
-
+
# Create temporary image
$image=Graphics::Magick->new;
'#808080', '#808000', '#FFFFFF', '#FFFF00',
'#800000', '#000080', '#FF0000', '#0000FF',
'#800080', '#008080', '#FF00FF', '#00FFFF' );
-
+
my $color;
foreach $color ( @colors ) {
print "not ok $test\n";
return 1;
}
-
+
if( ! ref($montage) ) {
print "not ok $test\n";
} else {
if ( $signature ne $ref_signature ) {
print "ReadImage()\n";
print "Test $test, signatures do not match.\n";
- print " Computed: $signature\n";
- print " Expected: $ref_signature\n";
+ print " Computed: $signature\n";
+ print " Expected: $ref_signature\n";
print " Depth: $depth\n";
$status = $montage->Write("test_${test}_out.miff");
warn "Write: $status" if "$status";
-
+
print "not ok $test\n";
} else {
# Check montage directory
q//, 0.002, 0.9);
++$test;
testReadCompare('ski.wmf', '../reference/wmf/ski.miff',
- q//, 0.021, 0.9);
+ q//, 0.021, 1.0);
++$test;
testReadCompare('fjftest.wmf', '../reference/wmf/fjftest.miff',
q//, 0.004, 0.5);
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
/*
-% Copyright (C) 2003-2015 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
dummy=ReadBlobLSBShort(image);
height=ReadBlobLSBShort(image);
- ldblk=(long) ((width+7) / 8);
+ ldblk=(long) (((size_t) width+7) / 8);
Padding=(unsigned char) ((-ldblk) & 0x01);
image->columns=width;
image->rows=height;
- if(GetBlobSize(image)!=(magick_off_t) (8+((long)ldblk+Padding)*image->rows))
+ if(GetBlobSize(image)!=(magick_off_t) (8+((size_t)ldblk+Padding)*image->rows))
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
if (CheckImagePixelLimits(image, exception) != MagickPass)
ThrowReaderException(ResourceLimitError,ImagePixelLimitExceeded,image);
DONE_READING:
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
pixels=MagickAllocateArray(unsigned char *,image->columns,4);
if (pixels == (unsigned char *) NULL)
ThrowAVSReaderException(ResourceLimitError,MemoryAllocationFailed,image);
- row_bytes=4*image->columns;
+ row_bytes=(size_t) 4*image->columns;
for (y=0; y < (long) image->rows; y++)
{
if (ReadBlob(image,row_bytes,pixels) != row_bytes)
if (MagickFail == status)
break;
+ StopTimer(&image->timer);
+
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
flipped_image->blob=ReferenceBlob(image->blob);
ReplaceImageInList(&image,flipped_image);
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
(void) WriteBlobString(image,buffer);
}
(void) FormatString(buffer,"Width: %.20g\n",(double)
- (image->columns+(image->columns % 2)));
+ image->columns+(image->columns % 2));
(void) WriteBlobString(image,buffer);
(void) FormatString(buffer,"Height: %.20g\n",(double)
image->rows);
/*
-% Copyright (C) 2009 GraphicsMagick Group
+% Copyright (C) 2009-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
FILE
*file;
+ TimerInfo
+ timer;
+
unsigned long
byte_count_pos,
strip_off_pos,
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ GetTimerInfo(&timer);
image=AllocateImage(image_info);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFail)
}
}
else
- if (LocaleNCompare(record,"rorient:",8) == 0)
- { /* rorient */
- unsigned long
- pel_path_rot,
- line_rot;
-
- pel_path_rot = line_rot = 0;
- if (sscanf(record+8,"%ld,%ld",&pel_path_rot,&line_rot) != 2)
- {
- orient = 0;
- break;
- }
- switch (pel_path_rot)
- {
+ if (LocaleNCompare(record,"rorient:",8) == 0)
+ { /* rorient */
+ unsigned long
+ pel_path_rot,
+ line_rot;
+
+ pel_path_rot = line_rot = 0;
+ if (sscanf(record+8,"%ld,%ld",&pel_path_rot,&line_rot) != 2)
+ {
+ orient = 0;
+ break;
+ }
+ switch (pel_path_rot)
+ {
case 90:
orient = 5;
break;
break;
default:
orient = 1;
+ }
+ if (line_rot == 90) orient++;
+ }
+ else
+ if (LocaleNCompare(record,"rpelcnt:",8) == 0)
+ { /* replcnt */
+ if (sscanf(record+8,"%ld,%ld",&width,&height) != 2)
+ {
+ width = 0;
+ height = 0;
+ break;
+ }
}
- if (line_rot == 90) orient++;
- }
- else
- if (LocaleNCompare(record,"rpelcnt:",8) == 0)
- { /* replcnt */
- if (sscanf(record+8,"%ld,%ld",&width,&height) != 2)
- {
- width = 0;
- height = 0;
- break;
- }
- }
- else
- if (LocaleNCompare(record,"rdensty:",8) == 0)
- { /* rdensty */
- if (sscanf(record+8,"%ld",&density) != 1)
- {
- density = 0;
- break;
- }
- if (!density) density = 200;
- }
+ else
+ if (LocaleNCompare(record,"rdensty:",8) == 0)
+ { /* rdensty */
+ if (sscanf(record+8,"%ld",&density) != 1)
+ {
+ density = 0;
+ break;
+ }
+ if (!density) density = 200;
+ }
}
if ((!width) || (!height) || (rtype != 1) || (!orient) || (!density) )
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
(void) strlcpy(image->magick_filename,image_info->filename,
sizeof(image->magick_filename));
(void) strlcpy(image->magick,"CALS",sizeof(image->magick));
+ StopTimer(&timer);
+ image->timer=timer;
+ }
+ else
+ {
+ DestroyImage(image);
+ image = (Image *) NULL;
}
return(image);
}
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ (void) memset(&metrics,0,sizeof(metrics));
image=AllocateImage(image_info);
if (image->columns == 0)
ThrowCAPTIONException(OptionError,MustSpecifyImageSize,image);
(void) AnnotateImage(image,draw_info);
DestroyDrawInfo(draw_info);
MagickFreeMemory(caption);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
if (EOFBlob(image))
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(GetFirstImageInList(image));
}
\f
time_t
current_time;
+#if defined(HAVE_LOCALTIME_R)
+ struct tm
+ tm_buf;
+#endif /* if defined(HAVE_LOCALTIME_R) */
+
const struct tm
*t;
current_time=time((time_t *) NULL);
- t=localtime(¤t_time);
+#if defined(HAVE_LOCALTIME_R)
+ t=localtime_r(¤t_time, &tm_buf);
+#else
+ t=localtime(¤t_time); /* Thread-unsafe version */
+#endif /* if defined(HAVE_LOCALTIME_R) */
(void) memset(timestamp,0,sizeof(timestamp));
(void) strftime(timestamp,MaxTextExtent,"%Y:%m:%d:%H:%M:%S%Z",t);
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
}
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif /* HasWINGDI32 */
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (scanline == (unsigned char *) NULL)
ThrowCMYKReaderException(ResourceLimitError,MemoryAllocationFailed,image);
tile_packets=(size_t) packet_size*image->tile_info.width;
- x=(size_t) (packet_size*image->tile_info.x);
+ x=(size_t) packet_size*image->tile_info.x;
if (image->logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"image->tile_info.x=%lu, packet_size=%u, "
image->columns,image->rows))
break;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
image->columns,image->rows))
break;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
if (EOFBlob(image))
ThrowCUTReaderException(CorruptImageError,UnexpectedEndOfFile,image);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (dcm->rescale_map == (Quantum *) NULL)
{
- size_t num_entries = Max(MaxMap+1,dcm->max_value_in+1);
+ size_t num_entries = Max((size_t) MaxMap+1,(size_t) dcm->max_value_in+1);
dcm->rescale_map=MagickAllocateArray(Quantum *,num_entries,sizeof(Quantum));
if (dcm->rescale_map == NULL)
{
if (dcm->upper_lim > dcm->lower_lim)
{
/* Use known range within image */
- win_width=(dcm->upper_lim-dcm->lower_lim+1)*dcm->rescale_slope;
- win_center=((dcm->upper_lim+dcm->lower_lim)/2)*dcm->rescale_slope+dcm->rescale_intercept;
+ win_width=((double) dcm->upper_lim-dcm->lower_lim+1)*dcm->rescale_slope;
+ win_center=(((double) dcm->upper_lim+dcm->lower_lim)/2.0)*dcm->rescale_slope+dcm->rescale_intercept;
}
else
{
/* Use full sample range and hope for the best */
- win_width=(dcm->max_value_in+1)*dcm->rescale_slope;
+ win_width=((double) dcm->max_value_in+1)*dcm->rescale_slope;
if (dcm->pixel_representation == 1)
win_center=dcm->rescale_intercept;
else
for (i=0; i < (dcm->max_value_in+1); i++)
{
if ((dcm->pixel_representation == 1) && (i >= MaxValueGivenBits(dcm->significant_bits)))
- Xr = -((dcm->max_value_in+1-i) * dcm->rescale_slope) + dcm->rescale_intercept;
+ Xr = -(((double) dcm->max_value_in+1-i) * dcm->rescale_slope) + dcm->rescale_intercept;
else
Xr = (i * dcm->rescale_slope) + dcm->rescale_intercept;
if (Xr <= Xw_min)
break;
}
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
*/
x=0;
y++;
- q=pixels+y*image->columns;
+ q=pixels+(size_t) y*image->columns;
break;
}
case 0x02:
if (byte == EOF)
return MagickFail;
y+=byte;
- q=pixels+y*image->columns+x;
+ q=pixels+y*(size_t) image->columns+x;
break;
}
default:
/*
Determine runlength.
*/
- for (i=1; ((x+i) < bytes_per_line); i++)
+ for (i=1; (((size_t) x+i) < bytes_per_line); i++)
if ((*(p+i) != *p) || (i == 255U))
break;
*q++=(unsigned char) i;
register unsigned char
*p;
+ TimerInfo
+ timer;
+
size_t
count,
length;
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ GetTimerInfo(&timer);
image=AllocateImage(image_info);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == False)
unsigned char
*dib_colormap;
- unsigned int
+ size_t
packet_size;
/*
*/
(void) memset(pixels,0,pixels_size);
status=DecodeImage(image,dib_info.compression,pixels,
- image->rows*image->columns);
+ (size_t) image->rows*image->columns);
if (status == False)
{
MagickFreeMemory(pixels);
*/
for (y=(long) image->rows-1; y >= 0; y--)
{
- p=pixels+(image->rows-y-1)*bytes_per_line;
+ p=pixels+((size_t) image->rows-y-1)*bytes_per_line;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
*/
for (y=(long) image->rows-1; y >= 0; y--)
{
- p=pixels+(image->rows-y-1)*bytes_per_line;
+ p=pixels+((size_t) image->rows-y-1)*bytes_per_line;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
bytes_per_line=image->columns;
for (y=(long) image->rows-1; y >= 0; y--)
{
- p=pixels+(image->rows-y-1)*bytes_per_line;
+ p=pixels+((size_t) image->rows-y-1)*bytes_per_line;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
*/
image->storage_class=DirectClass;
if (dib_info.compression == 1)
- bytes_per_line=2*image->columns;
+ bytes_per_line=(size_t) 2*image->columns;
for (y=(long) image->rows-1; y >= 0; y--)
{
- p=pixels+(image->rows-y-1)*bytes_per_line;
+ p=pixels+((size_t) image->rows-y-1)*bytes_per_line;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
*/
for (y=(long) image->rows-1; y >= 0; y--)
{
- p=pixels+(image->rows-y-1)*bytes_per_line;
+ p=pixels+((size_t) image->rows-y-1)*bytes_per_line;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
break;
if (image->previous == (Image *) NULL)
if (QuantumTick(y,image->rows))
- if (!MagickMonitorFormatted(image->rows-y-1,image->rows,&image->exception,
+ if (!MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,&image->exception,
LoadImageText,image->filename,
image->columns,image->rows))
break;
{
Image
*flipped_image;
-
/*
Correct image orientation.
*/
image=flipped_image;
}
CloseBlob(image);
+ StopTimer(&timer);
+ image->timer=timer;
return(image);
}
\f
/*
Convert run-length encoded raster pixels.
*/
- length=2*(bytes_per_line+2)*(image->rows+2)+2;
+ length=2*((size_t) bytes_per_line+2)*((size_t) image->rows+2)+2;
dib_data=MagickAllocateMemory(unsigned char *,length);
if (dib_data == (unsigned char *) NULL)
{
Dump colormap to file.
*/
dib_colormap=MagickAllocateArray(unsigned char *,
- (size_t) (1U << dib_info.bits_per_pixel),4);
+ (((size_t) 1U) << dib_info.bits_per_pixel),4);
if (dib_colormap == (unsigned char *) NULL)
{
MagickFreeMemory(pixels);
*q++=(Quantum) 0x0;
*q++=(Quantum) 0x0;
}
- (void) WriteBlob(image,4*(1U << dib_info.bits_per_pixel),
+ (void) WriteBlob(image, 4*(((size_t) 1U) << dib_info.bits_per_pixel),
(char *) dib_colormap);
MagickFreeMemory(dib_colormap);
}
/*
-% Copyright (C) 2003, 2004 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
MagickXFreeResources(display,visual_info,map_info,(MagickXPixelInfo *) NULL,
(XFontStruct *) NULL,&resource_info,(MagickXWindowInfo *) NULL);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#else
/*
-% Copyright (C) 2005-2019 GraphicsMagick Group
+% Copyright (C) 2005-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
*/
if (image_info->ping)
{
+ StopTimer(&image->timer);
CloseBlob(image);
return(image);
}
MagickFreeMemory(map_Y);
DestroyThreadViewDataSet(scanline_set);
DestroyThreadViewDataSet(samples_set);
+ StopTimer(&image->timer);
CloseBlob(image);
return(image);
}
time_t
current_time;
+#if defined(HAVE_LOCALTIME_R)
+ struct tm
+ tm_buf;
+#endif /* if defined(HAVE_LOCALTIME_R) */
+
const struct tm
*t;
p;
current_time=time((time_t *) NULL);
- t=localtime(¤t_time);
+#if defined(HAVE_LOCALTIME_R)
+ t=localtime_r(¤t_time, &tm_buf);
+#else
+ t=localtime(¤t_time); /* Thread-unsafe version */
+#endif /* if defined(HAVE_LOCALTIME_R) */
(void) strftime(timestamp,maxsize,"%Y:%m:%d:%H:%M:%S%Z",t);
timestamp[maxsize-1]='\0';
/*
-% Copyright (C) 2003-2017 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
SelectObject(hDC,hOldBitmap);
DeleteDC(hDC);
DeleteObject(hBitmap);
+ StopTimer(&image->timer);
return(image);
}
#endif /* HasWINGDI32 */
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (q == (PixelPacket *) NULL)
break;
- if (ReadBlob(image, packet_size*image->columns, fits_pixels) != (size_t)packet_size*image->columns)
+ if (ReadBlob(image, (size_t)packet_size*image->columns, fits_pixels) != (size_t)packet_size*image->columns)
{
if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),
" fits cannot read scanrow %u from a file.", (unsigned)y );
break;
}
+ StopTimer(&image->timer);
+
/*
Proceed to next image.
*/
len = strlen(data);
len = Min(len,80); /* Each card image is 80 bytes max */
- if (len > (size_t) (FITS_BLOCK_SIZE-offset))
- len = FITS_BLOCK_SIZE-offset;
+ if (len > (size_t) (((size_t)FITS_BLOCK_SIZE)-offset))
+ len = ((size_t) FITS_BLOCK_SIZE)-offset;
(void) strncpy(buffer+offset,data,len);
return offset +80;
FixSignedValues(pixels, image->columns, 2, export_options.endian);
if (quantum_size == 32)
FixSignedValues(pixels, image->columns, 4, export_options.endian);
- if (WriteBlob(image,packet_size*image->columns,pixels) != packet_size*image->columns)
+ if (WriteBlob(image, (size_t) packet_size*image->columns,pixels) != (size_t) packet_size*image->columns)
break;
- if (QuantumTick(image->rows-y-1,image->rows))
+ if (QuantumTick((size_t) image->rows-y-1,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t) image->rows-y-1,image->rows,
&image->exception,SaveImageText,
image->filename,
image->columns,image->rows);
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
MagickFreeMemory(scanline);
(void) FPX_CloseImage(flashpix);
FPX_ClearSystem();
+ StopTimer(&image->timer);
return(image);
}
#else
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
global_colormap=MagickAllocateArray(unsigned char *,3U,Max(global_colors,256U));
if (global_colormap == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
- (void) memset(global_colormap,0,3*Max(global_colors,256U));
+ (void) memset(global_colormap,0,(size_t) 3*Max(global_colors,256U));
if (BitSet(flag,0x80))
{
- if (ReadBlob(image,3*global_colors,(char *) global_colormap) != 3U*global_colors)
+ if (ReadBlob(image,(size_t) 3*global_colors,(char *) global_colormap) != (size_t) 3U*global_colors)
{
MagickFreeMemory(global_colormap);
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,
image);
}
- if (ReadBlob(image,3*image->colors,(char *) colormap) != 3*image->colors)
+ if (ReadBlob(image, (size_t) 3*image->colors,(char *) colormap) != (size_t) 3*image->colors)
{
MagickFreeMemory(global_colormap);
MagickFreeMemory(colormap);
GetImageException(image,exception);
ThrowReaderException(CorruptImageError,CorruptImage,image);
}
+ StopTimer(&image->timer);
if (image_info->subrange != 0)
if (image->scene >= (image_info->subimage+image_info->subrange-1))
break;
break;
(void) WriteBlobByte(image,(long) j); /* background color */
(void) WriteBlobByte(image,0x0); /* reserved */
- (void) WriteBlob(image,3*(1 << bits_per_pixel),(char *) colormap);
+ (void) WriteBlob(image,3*(((size_t) 1) << bits_per_pixel),(char *) colormap);
for (j=0; j < 768; j++)
global_colormap[j]=colormap[j];
}
c=0x00;
if (interlace != NoInterlace)
c|=0x40; /* pixel data is interlaced */
- for (j=0; j < (3*image->colors); j++)
+ for (j=0; j < ((size_t) 3*image->colors); j++)
if (colormap[j] != global_colormap[j])
break;
- if (j == (3*image->colors))
+ if (j == ((size_t) 3*image->colors))
(void) WriteBlobByte(image,c);
else
{
c|=0x80;
c|=(bits_per_pixel-1); /* size of local colormap */
(void) WriteBlobByte(image,c);
- (void) WriteBlob(image,3U*(1U << bits_per_pixel),(char *) colormap);
+ (void) WriteBlob(image,3*(((size_t) 1U) << bits_per_pixel),(char *) colormap);
}
/*
Write the image data.
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2019 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
Include declarations.
*/
#include "magick/studio.h"
+#include "magick/attribute.h"
#include "magick/blob.h"
#include "magick/color_lookup.h"
+#include "magick/enum_strings.h"
#include "magick/gradient.h"
+#include "magick/log.h"
#include "magick/magick.h"
#include "magick/utility.h"
#include "magick/studio.h"
% necessary for the new Image structure and returns a pointer to the new
% image.
%
+% The default is to apply a gradient from the top of the image to the bottom.
+% Since GraphicsMagick 1.3.35, this function responds to the
+% "gradient:direction" definition as follows:
+%
+% South - Top to Bottom (Default)
+% North - Bottom to Top
+% West - Right to Left
+% East - Left to Right
+% NorthWest - Bottom-Right to Top-Left
+% NorthEast - Bottom-Left to Top-Right
+% SouthWest - Top-Right Bottom-Left
+% SouthEast - Top-Left to Bottom-Right
+%
+% Also, since GraphicsMagick 1.3.35, an effort is made to produce a
+% PseudoClass image representation by default. If the gradient distance
+% vector produces a number of points less than or equal to the maximum
+% colormap size (MaxColormapSize), then a colormap is produced according
+% to the order indicated by the start and stop colors. Otherwise a
+% DirectClass image is created (as it always was prior to 1.3.35). The
+% PseudoClass representation is suitably initialized so that changing
+% the image storage class will lead to an immediately usable DirectClass
+% image.
+%
% The format of the ReadGRADIENTImage method is:
%
% Image *ReadGRADIENTImage(const ImageInfo *image_info,
Image
*image;
+ const char *
+ gravity;
+
/*
Initialize Image structure.
*/
(void) sscanf(image_info->filename,"%[^-]",colorname);
if (!QueryColorDatabase(colorname,&start_color,exception))
{
+ /* Promote warning to error */
+ exception->severity = OptionError;
DestroyImage(image);
return((Image *) NULL);
}
(void) sscanf(image_info->filename,"%*[^-]-%s",colorname);
if (!QueryColorDatabase(colorname,&stop_color,exception))
{
+ /* Promote warning to error */
+ exception->severity = OptionError;
DestroyImage(image);
return((Image *) NULL);
}
+ if ((gravity=AccessDefinition(image_info,"gradient","direction")))
+ image->gravity=StringToGravityType(gravity);
+ else
+ image->gravity=SouthGravity;
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Gradient using '%s' Gravity",
+ GravityTypeToString(image->gravity));
(void) GradientImage(image,&start_color,&stop_color);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (scanline == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
tile_packets=(size_t) packet_size*image->tile_info.width;
- x=(size_t) (packet_size*image->tile_info.x);
+ x=(size_t) packet_size*image->tile_info.x;
/*
Initialize import options.
*/
break;
}
image->is_grayscale=is_grayscale;
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count= (size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (j=0; j < count; j++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003-2017 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
#include "magick/magick.h"
#include "magick/monitor.h"
#include "magick/tempfile.h"
+#include "magick/quantize.h"
#include "magick/utility.h"
\f
/*
%
*/
static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
- Image *image)
+ Image *image)
{
#define HistogramDensity "256x200"
SetGeometry(image,&geometry);
if (image_info->density == (char *) NULL)
(void) GetMagickGeometry(HistogramDensity,&geometry.x,&geometry.y,
- &geometry.width,&geometry.height);
+ &geometry.width,&geometry.height);
else
(void) GetMagickGeometry(image_info->density,&geometry.x,&geometry.y,
- &geometry.width,&geometry.height);
+ &geometry.width,&geometry.height);
histogram_image=CloneImage(image,geometry.width,geometry.height,True,
- &image->exception);
+ &image->exception);
if (histogram_image == (Image *) NULL)
ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image);
(void) SetImageType(histogram_image,TrueColorType);
MagickFreeMemory(blue);
DestroyImage(histogram_image);
ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image)
- }
+ }
(void) memset(red,0,length*sizeof(long));
(void) memset(green,0,length*sizeof(long));
(void) memset(blue,0,length*sizeof(long));
Initialize histogram count arrays.
*/
for (y=0; y < (long) image->rows; y++)
- {
- p=AcquireImagePixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
- break;
- for (x=0; x < (long) image->columns; x++)
{
- red[ScaleQuantumToChar(p->red)]++;
- green[ScaleQuantumToChar(p->green)]++;
- blue[ScaleQuantumToChar(p->blue)]++;
- p++;
+ p=AcquireImagePixels(image,0,y,image->columns,1,&image->exception);
+ if (p == (const PixelPacket *) NULL)
+ break;
+ for (x=0; x < (long) image->columns; x++)
+ {
+ red[ScaleQuantumToChar(p->red)]++;
+ green[ScaleQuantumToChar(p->green)]++;
+ blue[ScaleQuantumToChar(p->blue)]++;
+ p++;
+ }
}
- }
maximum=0;
for (x=0; x < (long) histogram_image->columns; x++)
- {
- if (maximum < red[x])
- maximum=red[x];
- if (maximum < green[x])
- maximum=green[x];
- if (maximum < blue[x])
- maximum=blue[x];
- }
+ {
+ if (maximum < red[x])
+ maximum=red[x];
+ if (maximum < green[x])
+ maximum=green[x];
+ if (maximum < blue[x])
+ maximum=blue[x];
+ }
if (maximum > 0L)
scale=(double) histogram_image->rows/maximum;
else
Initialize histogram image.
*/
(void) QueryColorDatabase("black",&histogram_image->background_color,
- &image->exception);
+ &image->exception);
(void) SetImage(histogram_image,OpaqueOpacity);
for (x=0; x < (long) histogram_image->columns; x++)
- {
- q=GetImagePixels(histogram_image,x,0,1,histogram_image->rows);
- if (q == (PixelPacket *) NULL)
- break;
- y=(long) (histogram_image->rows-(long) (scale*red[x]));
- r=q+y;
- for ( ; y < (long) histogram_image->rows; y++)
- {
- r->red=MaxRGB;
- r++;
- }
- y=(long) (histogram_image->rows-(long) (scale*green[x]));
- r=q+y;
- for ( ; y < (long) histogram_image->rows; y++)
{
- r->green=MaxRGB;
- r++;
- }
- y=(long) (histogram_image->rows-(long) (scale*blue[x]));
- r=q+y;
- for ( ; y < (long) histogram_image->rows; y++)
- {
- r->blue=MaxRGB;
- r++;
- }
- if (!SyncImagePixels(histogram_image))
- break;
- if (QuantumTick(x,histogram_image->columns))
- if (!MagickMonitorFormatted(x,histogram_image->columns,&image->exception,
- SaveImageText,image->filename,
- image->columns,image->rows))
+ q=GetImagePixels(histogram_image,x,0,1,histogram_image->rows);
+ if (q == (PixelPacket *) NULL)
break;
- }
+ y=(long) (histogram_image->rows-(long) (scale*red[x]));
+ r=q+y;
+ for ( ; y < (long) histogram_image->rows; y++)
+ {
+ r->red=MaxRGB;
+ r++;
+ }
+ y=(long) (histogram_image->rows-(long) (scale*green[x]));
+ r=q+y;
+ for ( ; y < (long) histogram_image->rows; y++)
+ {
+ r->green=MaxRGB;
+ r++;
+ }
+ y=(long) (histogram_image->rows-(long) (scale*blue[x]));
+ r=q+y;
+ for ( ; y < (long) histogram_image->rows; y++)
+ {
+ r->blue=MaxRGB;
+ r++;
+ }
+ if (!SyncImagePixels(histogram_image))
+ break;
+ if (QuantumTick(x,histogram_image->columns))
+ if (!MagickMonitorFormatted(x,histogram_image->columns,&image->exception,
+ SaveImageText,image->filename,
+ image->columns,image->rows))
+ break;
+ }
/*
Free memory resources.
*/
DestroyImage(histogram_image);
ThrowWriterTemporaryFileException(filename);
}
- {
- char
- command[MaxTextExtent];
+ {
+ char
+ *histogram;
- /*
- Add a histogram as an image comment.
- */
- (void) GetNumberColors(image,file,&image->exception);
- (void) fclose(file);
- FormatString(command,"@%.1024s",filename);
- (void) SetImageAttribute(histogram_image,"comment",command);
- (void) LiberateTemporaryFile(filename);
- }
+ size_t
+ histogram_length;
+
+ /*
+ Add a histogram as an image comment.
+ */
+ (void) GetNumberColors(image,file,&image->exception);
+ (void) fclose(file);
+ histogram=FileToBlob(filename,&histogram_length,&histogram_image->exception);
+ (void) StripImage(histogram_image);
+ (void) SetImageAttribute(histogram_image,"comment",NULL);
+ if (histogram && histogram_length > 0)
+ (void) SetImageAttribute(histogram_image,"comment",histogram);
+ MagickFreeMemory(histogram);
+ (void) LiberateTemporaryFile(filename);
+ }
+ /*
+ Reduce to a PseudoClass image.
+ */
+ {
+ QuantizeInfo
+ quantize_info;
+
+ GetQuantizeInfo(&quantize_info);
+ quantize_info.number_colors=8;
+ quantize_info.dither=MagickFalse;
+ (void) QuantizeImage(&quantize_info,histogram_image);
+ }
/*
Write Histogram image as MIFF.
*/
(void) strlcpy(filename,histogram_image->filename,MaxTextExtent);
(void) strlcpy(histogram_image->filename,"miff:",MaxTextExtent);
(void) strlcat(histogram_image->filename,filename,MaxTextExtent);
+ histogram_image->compression=RLECompression;
status=WriteImage(image_info,histogram_image);
DestroyImage(histogram_image);
return(status);
/*
-% Copyright (C) 2009 GraphicsMagick Group
+% Copyright (C) 2009-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
ldblk = (long)(3*width);
- if(GetBlobSize(image)!=(((long)ldblk)*height))
+ if(GetBlobSize(image)!=((magick_off_t) ((size_t)ldblk*height)))
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
image->columns = width;
DONE_READING:
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
-% Copyright (C) 2003-2015 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
(void) strlcpy(icon_image->magick,image_info->magick,
sizeof(icon_image->magick));
ReplaceImageInList(&image,icon_image);
+ StopTimer(&image->timer);
/*
Proceed to next image.
/*
-% Copyright (C) 2009 GraphicsMagick Group
+% Copyright (C) 2009-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
DestroyImage(image);
image=(Image *) NULL;
}
+ else
+ {
+ StopTimer(&image->timer);
+ }
return(image);
}
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
%
*/
static Image *ReadJBIGImage(const ImageInfo *image_info,
- ExceptionInfo *exception)
+ ExceptionInfo *exception)
{
#define MaxBufferSize 8192
*/
jbg_dec_init(&jbig_info);
jbg_dec_maxsize(&jbig_info,(unsigned long) image->columns,
- (unsigned long) image->rows);
+ (unsigned long) image->rows);
image->columns= jbg_dec_getwidth(&jbig_info);
image->rows= jbg_dec_getheight(&jbig_info);
image->depth=1;
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
status=JBG_EAGAIN;
do
- {
- length=(long) ReadBlob(image,MaxBufferSize,(char *) buffer);
- if (length == 0)
- break;
- p=buffer;
- count=0;
- while ((length > 0) && ((status == JBG_EAGAIN) || (status == JBG_EOK)))
{
- status=jbg_dec_in(&jbig_info,p,length,&count);
- p+=count;
- length-=count;
- }
- } while ((status == JBG_EAGAIN) || (status == JBG_EOK));
+ length=(long) ReadBlob(image,MaxBufferSize,(char *) buffer);
+ if (length == 0)
+ break;
+ p=buffer;
+ count=0;
+ while ((length > 0) && ((status == JBG_EAGAIN) || (status == JBG_EOK)))
+ {
+ status=jbg_dec_in(&jbig_info,p,length,&count);
+ p+=count;
+ length-=count;
+ }
+ } while ((status == JBG_EAGAIN) || (status == JBG_EOK));
/*
Create colormap.
*/
{
ImportPixelAreaOptions
import_options;
-
+
ImportPixelAreaInfo
import_info;
- ImportPixelAreaOptionsInit(&import_options);
- import_options.grayscale_miniswhite=MagickTrue;
- p=jbg_dec_getimage(&jbig_info,0);
- for (y=0; y < image->rows; y++)
- {
- q=SetImagePixels(image,0,y,image->columns,1);
- if (q == (PixelPacket *) NULL)
- break;
- if (!ImportImagePixelArea(image,GrayQuantum,1,p,&import_options,&import_info))
- break;
- p+=import_info.bytes_imported;
- if (!SyncImagePixels(image))
- break;
- if (QuantumTick(y,image->rows))
- if (!MagickMonitorFormatted(y,image->rows,exception,LoadImageText,
- image->filename,
- image->columns,image->rows))
- break;
- }
+ ImportPixelAreaOptionsInit(&import_options);
+ import_options.grayscale_miniswhite=MagickTrue;
+ p=jbg_dec_getimage(&jbig_info,0);
+ for (y=0; y < image->rows; y++)
+ {
+ q=SetImagePixels(image,0,y,image->columns,1);
+ if (q == (PixelPacket *) NULL)
+ break;
+ if (!ImportImagePixelArea(image,GrayQuantum,1,p,&import_options,&import_info))
+ break;
+ p+=import_info.bytes_imported;
+ if (!SyncImagePixels(image))
+ break;
+ if (QuantumTick(y,image->rows))
+ if (!MagickMonitorFormatted(y,image->rows,exception,LoadImageText,
+ image->filename,
+ image->columns,image->rows))
+ break;
+ }
}
/*
Free scale resource.
CloseBlob(image);
image->is_grayscale=MagickTrue;
image->is_monochrome=MagickTrue;
+ StopTimer(&image->timer);
return(image);
}
#endif
char img_label_str[MaxTextExtent];
- alloc_size = TileInfo->PicSize + 2;
+ alloc_size = (size_t) TileInfo->PicSize + 2;
if (image->logging)
(void) LogMagickEvent(CoderEvent, GetMagickModule(),
scale_to_quantum=MaxRGBDouble/max_value;
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"Channel %d scale is %g", component, scale_to_quantum);
- channel_lut[component]=MagickAllocateArray(Quantum *,max_value+1,sizeof(Quantum));
+ channel_lut[component]=MagickAllocateArray(Quantum *, (size_t) max_value+1,sizeof(Quantum));
if (channel_lut[component] == (Quantum *) NULL)
ThrowJP2ReaderException(ResourceLimitError,MemoryAllocationFailed,image);
for(i=0; i <= max_value; i++)
jas_matrix_destroy(pixels);
(void) jas_stream_close(jp2_stream);
jas_image_destroy(jp2_image);
+ StopTimer(&image->timer);
return(image);
}
#endif
d=115-image_info->quality; /* Best number is 110-115 */
rate=100.0/(d*d);
header_size=550.0; /* Base file size. */
- header_size+=(number_components-1)*142; /* Additional components */
+ header_size+=((size_t) number_components-1)*142; /* Additional components */
/* FIXME: Need to account for any ICC profiles here */
current_size=(double)((image->rows*image->columns*image->depth)/8)*
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
longjmp(error_manager->error_recovery,1);
}
+#define GetProfileLength(jpeg_info, length) \
+ do { \
+ int \
+ _c; \
+ \
+ if (((_c = GetCharacter(jpeg_info)) != EOF) && (_c >= 0)) \
+ { \
+ length=_c*256; \
+ if (((_c = GetCharacter(jpeg_info)) != EOF) && (_c >= 0)) \
+ length+=_c; \
+ else \
+ length=0; \
+ } \
+ else \
+ { \
+ length=0; \
+ } \
+ } while(0)
+
static boolean ReadComment(j_decompress_ptr jpeg_info)
{
char
Image
*image;
+ register char
+ *p;
+
size_t
i,
length;
- register char
- *p;
+ int
+ c;
/*
Determine length of comment.
*/
error_manager=(ErrorManager *) jpeg_info->client_data;
image=error_manager->image;
- length=GetCharacter(jpeg_info) << 8;
- length+=GetCharacter(jpeg_info);
+ GetProfileLength(jpeg_info, length);
if (length <= 2)
return(True);
length-=2;
Read comment.
*/
p=comment;
- for (i=length; i != 0; i--)
+ for (i=0; i < length; i++)
{
- *p=GetCharacter(jpeg_info);
+ if ((c=GetCharacter(jpeg_info)) == EOF)
+ break;
+ *p=c;
p++;
}
*p='\0';
*profile;
int
+ c,
marker;
- boolean
- status = True;
-
/*
Determine length of generic profile.
*/
- length=GetCharacter(jpeg_info) << 8;
- length+=GetCharacter(jpeg_info);
+ GetProfileLength(jpeg_info, length);
if (length <= 2)
- return(status);
+ return(True);
length-=2;
marker=jpeg_info->unread_marker-JPEG_APP0;
profile=error_manager->buffer;
for (i=0 ; i < length ; i++)
- profile[i]=GetCharacter(jpeg_info);
+ {
+ if ((c=GetCharacter(jpeg_info)) != EOF)
+ profile[i]=c;
+ else
+ break;
+ }
+ if (i != length)
+ return True;
/*
Detect EXIF and XMP profiles.
/*
Store profile in Image.
*/
- status=AppendImageProfile(image,profile_name,profile+header_length,
+ (void) AppendImageProfile(image,profile_name,profile+header_length,
length-header_length);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
profile_name, (MAGICK_SIZE_T) header_length,
(MAGICK_SIZE_T) length-header_length);
- return (status);
+ return (True);
}
static boolean ReadICCProfile(j_decompress_ptr jpeg_info)
Image
*image;
+ unsigned char
+ *profile;
+
long
length;
register long
i;
- unsigned char
- *profile;
+ int
+ c;
/*
Determine length of color profile.
*/
- length=(long) GetCharacter(jpeg_info) << 8;
- length+=(long) GetCharacter(jpeg_info);
+ GetProfileLength(jpeg_info, length);
length-=2;
if (length <= 14)
{
length);
for (i=0 ; i < length; i++)
- profile[i]=GetCharacter(jpeg_info);
-
- (void) AppendImageProfile(image,"ICM",profile,length);
+ {
+ if ((c=GetCharacter(jpeg_info)) != EOF)
+ profile[i]=c;
+ else
+ break;
+ }
+ if (i == length)
+ (void) AppendImageProfile(image,"ICM",profile,length);
return(True);
}
tag[MaxTextExtent];
#endif
+ int
+ c;
+
/*
Determine length of binary data stored here.
*/
- length=(long) GetCharacter(jpeg_info) << 8;
- length+=(long) GetCharacter(jpeg_info);
+ GetProfileLength(jpeg_info, length);
length-=2;
if (length <= 0)
return(True);
"Profile: IPTC, %ld bytes",
length);
- for (i=0; i<length; i++)
- profile[i]=GetCharacter(jpeg_info);
-
- (void) AppendImageProfile(image,"IPTC",profile,length);
+ for (i=0; i < length; i++)
+ {
+ if ((c=GetCharacter(jpeg_info)) != EOF)
+ profile[i]=c;
+ else
+ break;
+ }
+ if (i == length)
+ (void) AppendImageProfile(image,"IPTC",profile,length);
return(True);
}
if (image->logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"return");
GetImageException(image,exception);
+ StopTimer(&image->timer);
return(image);
}
#endif
(void) SetImage(image,OpaqueOpacity);
(void) AnnotateImage(image,draw_info);
DestroyDrawInfo(draw_info);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Parts Copyright (c) 1985-1988 by Supoj Sutanthavibul
% Parts Copyright (c) 1989-2000 by Brian V. Smith
% Parts Copyright (c) 1991 by Paul King
const void
*blob;
+ TimerInfo
+ timer;
+
size_t
extent;
unsigned int
i;
+ GetTimerInfo(&timer);
clone_info=CloneImageInfo(image_info);
image=(Image *) NULL;
blob=NULL;
ThrowReaderException(BlobError,UnableToOpenFile,image)
}
image=BlobToImage(clone_info,blob,extent,exception);
-
- if ((image_info->size) && (LocaleCompare(image_info->magick,"PATTERN") == 0))
+ if (image != (Image *) NULL)
{
- Image
- *pattern_image;
+ StopTimer(&image->timer);
+ if ((clone_info->size != (char *) NULL) &&
+ (LocaleCompare(image_info->magick,"PATTERN") == 0))
+ {
+ Image
+ *pattern_image;
+
+ RectangleInfo
+ geometry;
- /*
- Tile pattern across image canvas.
- */
- pattern_image=image;
- image=AllocateImage(clone_info);
- (void) TextureImage(image,pattern_image);
- DestroyImage(pattern_image);
+ /*
+ Tile pattern across image canvas of specified size.
+ */
+ geometry.width=0;
+ geometry.height=0;
+ (void) GetGeometry(clone_info->size,&geometry.x,&geometry.y,&geometry.width,
+ &geometry.height);
+ if ((geometry.width == 0) || (geometry.height == 0))
+ {
+ DestroyImageInfo(clone_info);
+ ThrowReaderException(OptionError,GeometryDimensionsAreZero,image);
+ }
+ pattern_image=image;
+ image=ConstituteTextureImage(geometry.width,geometry.height,pattern_image,exception);
+ DestroyImage(pattern_image);
+ StopTimer(&timer);
+ if (image)
+ image->timer=timer;
+ }
}
DestroyImageInfo(clone_info);
/*
-% Copyright (C) 2003 GraphicsMagick Group
-% Copyright (C) 2002 ImageMagick Studio
+% Copyright (C) 2010-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
% MM MM A A C %
% M M M AAAAA C %
% M M A A C %
-% M M A A CCC % %
+% M M A A CCC %
% %
-% Read MAC: MacPaint Image Format. %
+% Read MAC: MacPaint Image Format. %
% %
% %
% Software Design %
unsigned int status;
const PixelPacket *q;
- /* Open image file. */
+ /* Open image file. */
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
image = AllocateImage(image_info);
status = OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
- if(status == False)
+ if (status == False)
ThrowReaderException(FileOpenError,UnableToOpenFile,image);
- /* Read MAC image. */
+ /* Read MAC image. */
ldblk = ReadBlobLSBShort(image);
- if((ldblk & 0xFF)!=0)
- ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
+ if ((ldblk & 0xFF)!=0)
+ ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
- if(ldblk==0) /* ???? don't know why */
- SeekBlob(image,0x200,SEEK_SET);
+ if (ldblk==0) /* ???? don't know why */
+ SeekBlob(image,0x200,SEEK_SET);
else
- SeekBlob(image,0x280,SEEK_SET);
+ SeekBlob(image,0x280,SEEK_SET);
image->columns = 576;
image->rows = 720;
if (!AllocateImageColormap(image,image->colors)) goto NoMemory;
- /* If ping is true, then only set image size and colors without reading any image data. */
+ /* If ping is true, then only set image size and colors without reading any image data. */
if (image_info->ping) goto DONE_READING;
/* ----- Load RLE compressed raster ----- */
ldblk = (image->depth*image->columns) /8;
BImgBuff = MagickAllocateMemory(unsigned char *, ((size_t)ldblk));
- if(BImgBuff==NULL)
- NoMemory:
- ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
+ if (BImgBuff==NULL)
+ NoMemory:
+ ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
DataPtr = BImgBuff;
x8=0; y=0;
- while(y<image->rows)
- {
- rep = ReadBlobByte(image);
- if(EOFBlob(image)) break;
-
- if( rep>=128 || rep<=0)
+ while (y<image->rows)
{
- b = ~ReadBlobByte(image);;
+ rep = ReadBlobByte(image);
+ if(EOFBlob(image)) break;
- rep = ~rep + 2;
- while(rep>0)
- {
- *DataPtr++ = b;
- x8++;
- rep--;
- if(x8>=ldblk)
+ if ( rep>=128 || rep<= 0)
{
- x8=0;
+ b = ~ReadBlobByte(image);;
+
+ rep = ~rep + 2;
+ while (rep>0)
+ {
+ *DataPtr++ = b;
+ x8++;
+ rep--;
+ if(x8>=ldblk)
+ {
+ x8=0;
- q = SetImagePixels(image,0,y,image->columns,1);
- if(q == (PixelPacket *)NULL) break;
- (void)ImportImagePixelArea(image,GrayQuantum,1,BImgBuff,NULL,0);
- if(!SyncImagePixels(image)) break;
+ q = SetImagePixels(image,0,y,image->columns,1);
+ if (q == (PixelPacket *)NULL) break;
+ (void)ImportImagePixelArea(image,GrayQuantum,1,BImgBuff,NULL,0);
+ if (!SyncImagePixels(image)) break;
- DataPtr = BImgBuff;
- y++;
- if(y>=image->rows)
- {
- break;
- }
+ DataPtr = BImgBuff;
+ y++;
+ if ( y >= image->rows )
+ {
+ break;
+ }
+ }
+ }
}
- }
- }
- else
- {
- rep++;
- while(rep>0)
- {
- b = ~ReadBlobByte(image);
- *DataPtr++ = b;
- x8++;
- rep--;
- if(x8>=ldblk)
+ else
{
- x8=0;
+ rep++;
+ while ( rep > 0 )
+ {
+ b = ~ReadBlobByte(image);
+ *DataPtr++ = b;
+ x8++;
+ rep--;
+ if ( x8>=ldblk )
+ {
+ x8=0;
- q = SetImagePixels(image,0,y,image->columns,1);
- if(q == (PixelPacket *)NULL) break;
- (void)ImportImagePixelArea(image,GrayQuantum,1,BImgBuff,NULL,0);
- if (!SyncImagePixels(image)) break;
+ q = SetImagePixels(image,0,y,image->columns,1);
+ if (q == (PixelPacket *)NULL) break;
+ (void)ImportImagePixelArea(image,GrayQuantum,1,BImgBuff,NULL,0);
+ if (!SyncImagePixels(image)) break;
- DataPtr = BImgBuff;
- y++;
- if(y>=image->rows)
- {
- break;
- }
+ DataPtr = BImgBuff;
+ y++;
+ if ( y >= image->rows )
+ {
+ break;
+ }
+ }
+ }
}
- }
}
- }
- if(BImgBuff!=NULL)
+ if (BImgBuff!=NULL)
MagickFreeMemory(BImgBuff);
- if(EOFBlob(image))
+ if (EOFBlob(image))
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,image->filename);
-DONE_READING:
+ DONE_READING:
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
Read image colormap.
*/
- if (ReadBlob(image,packet_size*image->colors,(char *) colormap) !=
- packet_size*image->colors)
+ if (ReadBlob(image, (size_t) packet_size*image->colors,(char *) colormap) !=
+ (size_t) packet_size*image->colors)
ThrowMAPReaderException(CorruptImageError,UnexpectedEndOfFile,image);
p=colormap;
if (image->colors <= 256)
if (q == (PixelPacket *) NULL)
break;
indexes=AccessMutableIndexes(image);
- if (ReadBlob(image,packet_size*image->columns,(char *) pixels) !=
- packet_size*image->columns)
+ if (ReadBlob(image, (size_t) packet_size*image->columns,(char *) pixels) !=
+ (size_t) packet_size*image->columns)
ThrowMAPReaderException(CorruptImageError,UnexpectedEndOfFile,image);
for (x=0; x < (long) image->columns; x++)
{
*q++=image->colormap[i].blue & 0xff;
}
#endif /* QuantumDepth > 8 */
- if (WriteBlob(image,packet_size*image->colors,(char *) colormap) !=
- packet_size*image->colors)
+ if (WriteBlob(image, (size_t) packet_size*image->colors,(char *) colormap) !=
+ (size_t) packet_size*image->colors)
ThrowMAPWriterException(FileOpenError,UnableToWriteFile,image);
MagickFreeMemory(colormap);
/*
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
image->columns = image->rows;
image->rows = temp;
if(HDR.imagf==1) ldblk *= 2;
- SeekBlob(image, HDR.nCols*ldblk, SEEK_CUR);
+ SeekBlob(image, (size_t) HDR.nCols*ldblk, SEEK_CUR);
goto skip_reading_current;
}
image = rotated_image;
}
+ StopTimer(&image->timer);
+
skip_reading_current:
if (image_info->subrange != 0)
/* Allocate next image structure. */
AllocateNextImage(image_info,image);
- if (image->next == (Image *) NULL) break;
+ if ((image == (Image *) NULL) || (image->next == (Image *) NULL)) break;
image=SyncNextImageInList(image);
image->columns = image->rows = 0;
image->colors=0;
char padding;
char MATLAB_HDR[0x80];
time_t current_time;
+#if defined(HAVE_LOCALTIME_R)
+ struct tm tm_buf;
+#endif /* if defined(HAVE_LOCALTIME_R) */
const struct tm *t;
unsigned char *pixels;
int is_gray;
unsigned char ImageName = 'A';
current_time = time((time_t *)NULL);
- t = localtime(¤t_time);
+#if defined(HAVE_LOCALTIME_R)
+ t=localtime_r(¤t_time, &tm_buf);
+#else
+ t=localtime(¤t_time); /* Thread-unsafe version */
+#endif /* if defined(HAVE_LOCALTIME_R) */
/*
Open output image file.
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
else
{
/* short format */
- tag_length=((long) c) << 8;
+ tag_length=((size_t) c) << 8;
c=(*p++);
blob_length--;
if (blob_length == 0)
}
if (taglen < 0) return -1;
/* make a buffer to hold the tag data and snag it from the input stream */
- str=MagickAllocateMemory(unsigned char *,(unsigned int) (taglen+1));
+ str=MagickAllocateMemory(unsigned char *, (size_t) taglen+1);
if (str == (unsigned char *) NULL)
{
(void) printf("MemoryAllocationFailed");
}
if (taglen < 0) return -1;
/* make a buffer to hold the tag data and snag it from the input stream */
- str=MagickAllocateMemory(unsigned char *,(unsigned int) (taglen+1));
+ str=MagickAllocateMemory(unsigned char *,(size_t) taglen+1);
if (str == (unsigned char *) NULL)
{
(void) printf("MemoryAllocationFailed");
goto format8BIMError;
}
plen = (unsigned char) c;
- PString=MagickAllocateMemory(unsigned char *,(unsigned int) (plen+1));
+ PString=MagickAllocateMemory(unsigned char *,(size_t) plen+1);
if (PString == (unsigned char *) NULL)
{
ThrowException(&ofile->exception,ResourceLimitError,MemoryAllocationFailed,
*buff;
size_t
- iptc_offset,
+ iptc_offset = 0,
length;
const unsigned char
if((profile=GetImageProfile(image,"IPTC",&profile_length)) == 0)
ThrowWriterException(CoderError,NoIPTCProfileAvailable,image);
length=GetIPTCStream(profile,profile_length,&iptc_offset);
- info=profile+iptc_offset;
if (length == 0)
ThrowWriterException(CoderError,NoIPTCInfoWasFound,image);
+ info=profile+iptc_offset;
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFail)
ThrowWriterException(FileOpenError,UnableToOpenFile,image);
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
DestroyImageList(image);
return((Image *) NULL);
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
if (LocaleNCompare(keyword,"profile-",8) == 0)
{
i=(long) number_of_profiles;
- MagickReallocMemory(ProfileInfo *,profiles,(i+1)*sizeof(ProfileInfo));
+ MagickReallocMemory(ProfileInfo *,profiles,MagickArraySize((size_t) i+1,sizeof(ProfileInfo)));
if (profiles == (ProfileInfo *) NULL)
{
MagickFreeMemory(values);
Read image colormap from file.
*/
packet_size=image->depth > 8 ? 6 : 3;
- colormap=MagickAllocateMemory(unsigned char *,packet_size*image->colors);
+ colormap=MagickAllocateArray(unsigned char *,packet_size,image->colors);
if (colormap == (unsigned char *) NULL)
ThrowMPCReaderException(ResourceLimitError,MemoryAllocationFailed,
image);
- (void) ReadBlob(image,packet_size*image->colors,colormap);
+ (void) ReadBlob(image, (size_t) packet_size*image->colors,colormap);
p=colormap;
if (image->depth <= 8)
for (i=0; i < (long) image->colors; i++)
status=PersistCache(image,cache_filename,MagickTrue,&offset,exception);
if (status == MagickFail)
ThrowMPCReaderException(CacheError,UnableToPeristPixelCache,image);
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
Allocate colormap.
*/
packet_size=image->depth > 8 ? 6 : 3;
- colormap=MagickAllocateMemory(unsigned char *,packet_size*image->colors);
+ colormap=MagickAllocateArray(unsigned char *,packet_size,image->colors);
if (colormap == (unsigned char *) NULL)
return(MagickFail);
/*
}
#endif /* QuantumDepth > 8 */
- (void) WriteBlob(image,packet_size*image->colors,colormap);
+ (void) WriteBlob(image, (size_t) packet_size*image->colors,colormap);
MagickFreeMemory(colormap);
}
/*
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
unsigned long
count;
+ assert(image_info != (const ImageInfo *) NULL);
+ assert(image_info->signature == MagickSignature);
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickSignature);
+
/*
Write parameter file (see mpeg2encode documentation for details).
*/
file=(FILE *) NULL;
return(False);
}
- q=Min(Max(66.0-(2*image_info->quality)/3.0,1.0),255);
+ q=Min(Max(66.0-(2.0*image_info->quality)/3.0,1.0),255.0);
for (i=0; i < 64; i++)
{
(void) fprintf(parameter_file," %d",(int) q);
*/
if(!AcquireTemporaryFileName(basename))
{
- DestroyImage(coalesce_image);
+ DestroyImageList(coalesce_image);
ThrowWriterTemporaryFileException(basename);
}
FormatString(coalesce_image->filename,"%.1024s",basename);
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
pixels=MagickAllocateArray(unsigned char *,image->columns,3);
if (pixels == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
- row_size=image->columns*3;
+ row_size= (size_t) image->columns*3;
for (y=0; y < (long) image->rows; y++)
{
if (ReadBlob(image,row_size,pixels) != row_size)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
(void) DrawImage(image,draw_info);
DestroyDrawInfo(draw_info);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
(void) strlcpy(image->filename,image_info->filename,MaxTextExtent);
status=QueryColorDatabase((char *) image_info->filename,
&image->background_color,exception);
- if (status == False)
+ if (status == MagickFail)
{
+ /* Promote warning to error */
+ exception->severity = OptionError;
DestroyImage(image);
return((Image *) NULL);
}
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
image->colormap[0]=image->background_color;
status=SetImageEx(image,OpaqueOpacity,exception);
+ StopTimer(&image->timer);
if (status == MagickFail)
{
DestroyImage(image);
/*
-% Copyright (C) 2003-2015 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
MagickFreeMemory(one_row);
MagickFreeMemory(lastrow);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
break; \
p=buffer; \
} \
- sum|=((unsigned int) (*p) << (24-bits)); \
+ sum|=(((unsigned int) (*p)) << (24-bits)); \
bits+=8; \
p++; \
} \
image->columns, image->rows,
(image->columns > 1536 ? 3U : 1U));
pcd_table[2]=pcd_table[1]=pcd_table[0]=(PCDTable *) NULL;
+ pcd_length[2]=pcd_length[1]=pcd_length[0]=0;
buffer=MagickAllocateMemory(unsigned char *,0x800);
if (buffer == (unsigned char *) NULL)
ThrowBinaryException(ResourceLimitError,MemoryAllocationFailed,
}
pcd_length[i]=(unsigned int) length;
}
+ if (EOFBlob(image))
+ {
+ status=MagickFail;
+ goto decode_image_error;
+ }
+
/*
Search for Sync byte.
*/
image->colorspace=YCCColorspace;
if (TransformColorspace(image,RGBColorspace) != MagickPass)
break;
+ StopTimer(&image->timer);
if (j < (long) number_images)
{
/*
image->chromaticity.white_point.x=0.3127f;
image->chromaticity.white_point.y=0.3290f;
image->gamma=1.000f/2.200f;
+ StopTimer(&image->timer);
return(image);
}
\f
*/
if (unrep)
{
- q -= (unrep + rep);
+ q -= ((size_t) unrep + rep);
while (unrep)
{
unrep_this_time = (unrep >= 128)?128:unrep;
*/
if (unrep)
{
- q -= (unrep + rep);
+ q -= ((size_t) unrep + rep);
while (unrep)
{
*out++=0;
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
MagickArraySize(pcx_info.bytes_per_line,
pcx_info.planes));
if ((0 == pcx_packets) ||
- ((size_t) (pcx_info.bits_per_pixel*pcx_info.planes*image->columns) >
- (pcx_packets*8U)))
+ (((size_t) pcx_info.bits_per_pixel*pcx_info.planes*image->columns) >
+ ((size_t) pcx_packets*8U)))
ThrowPCXReaderException(CorruptImageError,ImproperImageHeader,image);
pcx_pixels=MagickAllocateMemory(unsigned char *,pcx_packets);
if (pcx_pixels == (unsigned char *) NULL)
256 color images have their color map at the end of the file.
*/
pcx_info.colormap_signature=ReadBlobByte(image);
- (void) ReadBlob(image,3*image->colors,(char *) pcx_colormap);
+ (void) ReadBlob(image, (size_t) 3*image->colors,(char *) pcx_colormap);
p=pcx_colormap;
for (i=0; i < image->colors; i++)
{
*/
for (y=0; y < (long) image->rows; y++)
{
- p=pcx_pixels+((unsigned long) y*pcx_info.bytes_per_line*pcx_info.planes);
+ p=pcx_pixels+((size_t) y*pcx_info.bytes_per_line*pcx_info.planes);
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
*q;
size_t
- length;
+ bytes_per_line;
unsigned char
*pcx_colormap = (unsigned char *) NULL,
if (image->matte)
pcx_info.planes++;
}
- pcx_info.bytes_per_line=(unsigned short)
- (((unsigned long) image->columns*pcx_info.bits_per_pixel+7)/8);
+
+ /* image->columns*pcx_info.bits_per_pixel+7)/8 */
+ bytes_per_line=MagickArraySize(image->columns,pcx_info.bits_per_pixel);
+ if (bytes_per_line && (~((size_t)0)-7 > bytes_per_line))
+ bytes_per_line += 7;
+ bytes_per_line /= 8;
+ pcx_info.bytes_per_line=(unsigned short) bytes_per_line;
+ if ((pcx_info.bytes_per_line == 0) ||
+ ((size_t) pcx_info.bytes_per_line != bytes_per_line))
+ ThrowPCXWriterException(CoderError,UnsupportedNumberOfColumns,image);
pcx_info.palette_info=1;
pcx_info.colormap_signature=0x0c;
/*
for (i=0; i < 58; i++)
(void) WriteBlobByte(image,'\0');
/* Allocate memory for one pixel row. */
- length=(size_t) pcx_info.bytes_per_line*pcx_info.planes;
- pcx_pixels=MagickAllocateMemory(unsigned char *,length);
+ pcx_pixels=MagickAllocateArray(unsigned char *,bytes_per_line,pcx_info.planes);
if (pcx_pixels == (unsigned char *) NULL)
ThrowPCXWriterException(ResourceLimitError,MemoryAllocationFailed,image);
q=pcx_pixels;
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
MagickFreeMemory(comment);
}
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
pdb_info.seed=0;
pdb_info.next_record=0;
comment=GetImageAttribute(image,"comment");
- pdb_info.number_records=(comment == (ImageAttribute *) NULL ? 1 : 2);
+ pdb_info.number_records=1;
+ if ((comment != (ImageAttribute *) NULL) && (comment->value != (char *) NULL))
+ pdb_info.number_records++;
if (image->logging)
LogPDPInfo(&pdb_info);
(void) WriteBlob(image,32,pdb_info.name);
{
if (!AcquireImagePixels(image,0,y,image->columns,1,&image->exception))
break;
- (void) memset(scanline,0,image->columns*packet_size); /* FIXME: remove */
+ (void) memset(scanline,0, (size_t) image->columns*packet_size); /* FIXME: remove */
(void) ExportImagePixelArea(image,GrayQuantum,bits_per_pixel,scanline,0,0);
for (x=0; x < pdb_image.width; x++)
{
/*
Write the Image record header.
*/
- (void) WriteBlobMSBLong(image,(unsigned long)
- (TellBlob(image)+8*pdb_info.number_records));
+ (void) WriteBlobMSBLong(image,(magick_uint32_t)
+ (TellBlob(image)+(size_t)8*pdb_info.number_records));
(void) WriteBlobByte(image,0x40);
(void) WriteBlobByte(image,0x6f);
(void) WriteBlobByte(image,0x80);
(void) WriteBlobMSBShort(image,pdb_image.height);
(void) WriteBlob(image,q-p,p);
MagickFreeMemory(p);
- if (pdb_info.number_records > 1)
+ if ((comment != (ImageAttribute *) NULL) && (comment->value != (char *) NULL))
(void) WriteBlobString(image,comment->value);
CloseBlob(image);
return(True);
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
fax_blob_length,
length;
+#if defined(HAVE_LOCALTIME_R)
+ struct tm
+ tm_buf;
+#endif /* if defined(HAVE_LOCALTIME_R) */
+
struct tm
*time_meridian;
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
seconds=time((time_t *) NULL);
- time_meridian=localtime(&seconds);
+#if defined(HAVE_LOCALTIME_R)
+ time_meridian=localtime_r(&seconds,&tm_buf);
+#else
+ time_meridian=localtime(&seconds); /* Thread-unsafe version */
+#endif /* if defined(HAVE_LOCALTIME_R) */
+
FormatString(date,"D:%04d%02d%02d%02d%02d%02d",time_meridian->tm_year+1900,
time_meridian->tm_mon+1,time_meridian->tm_mday,time_meridian->tm_hour,
time_meridian->tm_min,time_meridian->tm_sec);
kid_image=kid_image->next;
}
MagickReallocMemory(ExtendedSignedIntegralType *,xref,
- (count+2048)*sizeof(ExtendedSignedIntegralType));
+ MagickArraySize((size_t) count+2048,sizeof(ExtendedSignedIntegralType)));
if (xref == (ExtendedSignedIntegralType *) NULL)
ThrowPDFWriterException(ResourceLimitError,MemoryAllocationFailed,image);
}
FormatString(buffer,"/F%lu %g Tf\n",image->scene,
image_info->pointsize);
(void) WriteBlobString(image,buffer);
- FormatString(buffer,"%ld %g Td\n",geometry.x,geometry.y+
- geometry.height+i*image_info->pointsize+12);
+ FormatString(buffer,"%ld %g Td\n",geometry.x,(double) geometry.y+
+ (double) geometry.height+i*(double) image_info->pointsize+12);
(void) WriteBlobString(image,buffer);
FormatString(buffer,"(%.1024s) Tj\n",labels[i]);
(void) WriteBlobString(image,buffer);
/*
Allocate pixel array.
*/
- length=(image->colorspace == CMYKColorspace ? 4 : 3)*number_pixels;
+ length=(size_t) (image->colorspace == CMYKColorspace ? 4 : 3)*number_pixels;
pixels=MagickAllocateMemory(unsigned char *,length);
if (pixels == (unsigned char *) NULL)
ThrowPDFWriterException(ResourceLimitError,MemoryAllocationFailed,
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
*/
#define ValidateRectangle(rectangle) \
((!EOFBlob(image) && \
- (rectangle.bottom - rectangle.top > 0) && \
- (rectangle.right - rectangle.left > 0)))
+ !((rectangle.bottom | rectangle.top | rectangle.right | rectangle.left ) & 0x8000) && \
+ !(rectangle.bottom < rectangle.top) && \
+ !(rectangle.right < rectangle.left)))
/*
Issue a trace message with rectangle dimensions.
typedef struct _PICTPixmap
{
- short
+ magick_uint16_t
version,
pack_type;
- unsigned long
+ magick_uint32_t
pack_size,
horizontal_resolution,
vertical_resolution;
- short
+ magick_uint16_t
pixel_type,
bits_per_pixel,
component_count,
component_size;
- unsigned long
+ magick_uint32_t
plane_bytes,
table,
reserved;
typedef struct _PICTRectangle
{
- short
+ magick_uint16_t
top,
left,
bottom,
const unsigned int bits_per_pixel)
{
unsigned long
- j,
y;
- register unsigned long
- i;
-
register const unsigned char
*p;
size_t
allocated_pixels,
+ scanline_alloc,
row_bytes;
unsigned char
*scanline = NULL;
unsigned long
- bytes_per_pixel,
- length,
number_pixels,
- scanline_length,
width;
magick_off_t
file_size;
+ unsigned int
+ bytes_per_pixel,
+ i,
+ j,
+ length,
+ scanline_length;
+
ARG_NOT_USED(image_info);
if (image->logging)
/*
Allocate pixel and scanline buffer.
*/
- pixels=MagickAllocateArray(unsigned char *,image->rows,row_bytes);
+ allocated_pixels=MagickArraySize(image->rows,row_bytes);
+ pixels=MagickAllocateClearedMemory(unsigned char *,allocated_pixels);
if (pixels == (unsigned char *) NULL)
{
ThrowException(&image->exception,ResourceLimitError,MemoryAllocationFailed,
image->filename);
goto decode_error_exit;
}
- allocated_pixels=image->rows*row_bytes;
- (void) memset(pixels,0,allocated_pixels);
- /* FIXME: Extra +1 avoids heap read overflow (oss-fuzz 12019) */
- scanline=MagickAllocateMemory(unsigned char *,row_bytes+1);
+ /* Use a worst-case allocation policy (because we can afford to) */
+ if (bytes_per_line < 8)
+ scanline_alloc = bytes_per_line;
+ else if (bytes_per_line <= 200)
+ scanline_alloc = 256U+256U; /* Allocate extra for RLE over-run */
+ else
+ scanline_alloc = 65536U+256U; /* Allocate extra for RLE over-run */
+
+ scanline=MagickAllocateClearedMemory(unsigned char *,scanline_alloc);
if (scanline == (unsigned char *) NULL)
{
ThrowException(&image->exception,ResourceLimitError,MemoryAllocationFailed,
*/
for (y=0; y < image->rows; y++)
{
- q=pixels+y*width;
+ q=pixels+(size_t)y*width;
number_pixels=bytes_per_line;
if (ReadBlob(blob,number_pixels,(char *) scanline) != number_pixels)
{
*/
for (y=0; y < image->rows; y++)
{
- q=pixels+y*width;
+ q=pixels+(size_t)y*width;
if (bytes_per_line > 200)
scanline_length=ReadBlobMSBShort(blob);
else
scanline_length=ReadBlobByte(blob);
- if (scanline_length >= row_bytes)
+ if (image->logging)
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "scanline_length = %u, "
+ "scanline_alloc = %"MAGICK_SIZE_T_F"u",
+ scanline_length, (MAGICK_SIZE_T)scanline_alloc);
+ if (scanline_length < 2)
{
ThrowException(&image->exception,CorruptImageError,UnableToUncompressImage,
- "scanline length exceeds row bytes");
+ image->filename);
goto decode_error_exit;
}
if (ReadBlob(blob,scanline_length,(char *) scanline) != scanline_length)
{
ThrowException(&image->exception,CorruptImageError,UnexpectedEndOfFile,
- image->filename);
+ "Scanline length too small!");
goto decode_error_exit;
}
- (void) memset(scanline+scanline_length,0,row_bytes-scanline_length); /* Zero */
+ #if 0
+ (void) memset(scanline+scanline_length,0,scanline_alloc-scanline_length); /* Zero remainder */
+ #endif
for (j=0; j < scanline_length; )
if ((scanline[j] & 0x80) == 0)
{
length=(scanline[j] & 0xff)+1;
number_pixels=length*bytes_per_pixel;
p=ExpandBuffer(expand_buffer,scanline+j+1,&number_pixels,bits_per_pixel);
- if (j+number_pixels >= scanline_length)
- {
- errno=0;
- ThrowException(&image->exception,CorruptImageError,UnableToUncompressImage,
- "Decoded RLE pixels exceeds allocation!");
- goto decode_error_exit;
- }
- if ((q+number_pixels > pixels+allocated_pixels))
+ if (!((pixels+allocated_pixels)-number_pixels > q))
{
ThrowException(&image->exception,CorruptImageError,UnableToUncompressImage,
"Decoded RLE pixels exceeds allocation!");
goto decode_error_exit;
}
-
- (void) memcpy(q,p,number_pixels); /* ASAN report */
+ (void) memcpy(q,p,number_pixels);
q+=number_pixels;
j+=length*bytes_per_pixel+1;
}
p=ExpandBuffer(expand_buffer,scanline+j+1,&number_pixels,bits_per_pixel);
for (i=0; i < length; i++)
{
- if ((q+number_pixels > pixels+allocated_pixels))
+ if (!((pixels+allocated_pixels)-number_pixels > q))
{
ThrowException(&image->exception,CorruptImageError,UnableToUncompressImage,
"Decoded RLE pixels exceeds allocation!");
size_t
length;
+ magick_off_t
+ file_size;
+
unsigned int
jpeg,
status;
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == False)
ThrowPICTReaderException(FileOpenError,UnableToOpenFile,image);
+ file_size=GetBlobSize(image);
pixmap.bits_per_pixel=0;
pixmap.component_count=0;
/*
if (version != 1)
ThrowPICTReaderException(CorruptImageError,ImproperImageHeader,image);
/*
- Validate dimensions
- */
- if ((frame.left < 0) || (frame.right < 0) || (frame.top < 0) || (frame.bottom < 0) ||
- (frame.left >= frame.right) || (frame.top >= frame.bottom))
- {
- ThrowPICTReaderException(CorruptImageError,ImproperImageHeader,image);
- }
-
- /*
Create black canvas.
*/
flags=0;
image->columns=frame.right-frame.left;
image->rows=frame.bottom-frame.top;
- SetRedSample(&image->background_color,0);
- SetGreenSample(&image->background_color,0);
- SetBlueSample(&image->background_color,0);
- SetOpacitySample(&image->background_color,OpaqueOpacity);
- SetImage(image,OpaqueOpacity);
if (IsEventLogging())
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
if (CheckImagePixelLimits(image, exception) != MagickPass)
ThrowPICTReaderException(ResourceLimitError,ImagePixelLimitExceeded,image);
+ SetRedSample(&image->background_color,0);
+ SetGreenSample(&image->background_color,0);
+ SetBlueSample(&image->background_color,0);
+ SetOpacitySample(&image->background_color,OpaqueOpacity);
+ if (SetImageEx(image,OpaqueOpacity,exception) != MagickPass)
+ {
+ CloseBlob(image);
+ DestroyImage(image);
+ return (Image *) NULL;
+ }
+
/*
Interpret PICT opcodes.
*/
i=(*p++);
j=(*p);
q->red=ScaleCharToQuantum((i & 0x7c) << 1);
- q->green=ScaleCharToQuantum(((i & 0x03) << 6) |
- ((j & 0xe0) >> 2));
+ q->green=ScaleCharToQuantum((((size_t)i & 0x03) << 6) |
+ (((size_t) j & 0xe0) >> 2));
q->blue=ScaleCharToQuantum((j & 0x1f) << 3);
}
else
q->red=ScaleCharToQuantum(*p);
q->green=
ScaleCharToQuantum(*(p+tile_image->columns));
- q->blue=ScaleCharToQuantum(*(p+2*tile_image->columns));
+ q->blue=ScaleCharToQuantum(*(p+ (size_t)2*tile_image->columns));
}
else
{
q->opacity=(Quantum) (MaxRGB-ScaleCharToQuantum(*p));
q->red=ScaleCharToQuantum(*(p+tile_image->columns));
q->green=(Quantum)
- ScaleCharToQuantum(*(p+2*tile_image->columns));
+ ScaleCharToQuantum(*(p+ (size_t)2*tile_image->columns));
q->blue=
- ScaleCharToQuantum(*(p+3*tile_image->columns));
+ ScaleCharToQuantum(*(p+ (size_t)3*tile_image->columns));
}
}
p++;
break;
if ((tile_image->storage_class == DirectClass) &&
(pixmap.bits_per_pixel != 16))
- p+=(pixmap.component_count-1)*tile_image->columns;
+ p+=((size_t) pixmap.component_count-1)*tile_image->columns;
if (destination.bottom == (long) image->rows)
if (QuantumTick(y,tile_image->rows))
if (!MagickMonitorFormatted(y,tile_image->rows,&image->exception,
continue;
if (code == 0x8200)
{
- FILE
- *file;
-
- char
- tmpfile[MaxTextExtent];
-
/*
Embedded JPEG.
*/
jpeg=True;
- clone_info=CloneImageInfo(image_info);
- clone_info->blob=(void *) NULL;
- clone_info->length=0;
- file=AcquireTemporaryFileStream(tmpfile,BinaryFileIOMode);
- if (file == (FILE *) NULL)
- {
- DestroyImageInfo(clone_info);
- ThrowReaderTemporaryFileException(image_info->filename);
- }
- (void) strlcpy(clone_info->filename,"JPEG:",sizeof(clone_info->filename));
- (void) strlcat(clone_info->filename,tmpfile,sizeof(clone_info->filename));
length=ReadBlobMSBLong(image);
- if (length > 154)
+ if ((length > 154) && ((file_size <= 0) || ((size_t) (file_size-TellBlob(image)) > length)))
{
+ void
+ *blob,
+ *blob_alloc;
+
+ const size_t
+ blob_alloc_size = length-154;
+
for (i=0; i < 6; i++)
(void) ReadBlobMSBLong(image);
ReadRectangle(frame);
TraceRectangle(image,frame);
if (!ValidateRectangle(frame))
- {
- (void) fclose(file);
- ThrowPICTReaderException(CorruptImageError,ImproperImageHeader,image);
- }
+ ThrowPICTReaderException(CorruptImageError,ImproperImageHeader,image);
for (i=0; i < 122; i++)
if (ReadBlobByte(image) == EOF)
- break;
- for (i=0; i < (long) (length-154); i++)
+ ThrowPICTReaderException(CorruptImageError,UnexpectedEndOfFile,image);
+ if ((blob_alloc=MagickAllocateMemory(void *,blob_alloc_size)) == (void *) NULL)
+ ThrowPICTReaderException(ResourceLimitError,MemoryAllocationFailed,image);
+ blob=blob_alloc;
+ clone_info=CloneImageInfo(image_info);
+ clone_info->blob=(void *) NULL;
+ clone_info->length=0;
+ (void) strlcpy(clone_info->filename,"JPEG:",sizeof(clone_info->filename));
+ if (ReadBlobZC(image,blob_alloc_size,&blob) != blob_alloc_size)
{
- if ((c=ReadBlobByte(image)) == EOF)
- break;
- (void) fputc(c,file);
+ MagickFreeMemory(blob_alloc);
+ ThrowPICTReaderException(CorruptImageError,UnexpectedEndOfFile,image);
+ }
+ if (blob != blob_alloc)
+ {
+ if (image->logging)
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile Zero copy read.");
}
+ tile_image=BlobToImage(clone_info, blob, blob_alloc_size, &image->exception );
+ DestroyImageInfo(clone_info);
+ clone_info=(ImageInfo *) NULL;
+ MagickFreeMemory(blob_alloc);
}
- (void) fclose(file);
- tile_image=ReadImage(clone_info,exception);
- (void) LiberateTemporaryFile(clone_info->filename);
- DestroyImageInfo(clone_info);
- clone_info=(ImageInfo *) NULL;
if (tile_image == (Image *) NULL)
continue;
+ if (IsEventLogging())
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile Dimensions: %lux%lu",
+ tile_image->columns,tile_image->rows);
+ if (IsEventLogging())
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile Resolution: %gx%g %s",
+ tile_image->x_resolution,
+ tile_image->y_resolution,
+ tile_image->units == PixelsPerInchResolution ?
+ "pixels/inch" :
+ (tile_image->units == PixelsPerCentimeterResolution ?
+ "pixels/centimeter" :
+ "pixels"));
FormatString(geometry,"%lux%lu",Max(image->columns,tile_image->columns),
Max(image->rows,tile_image->rows));
- (void) TransformImage(&image,(char *) NULL,geometry);
- (void) CompositeImage(image,CopyCompositeOp,tile_image,frame.left,
- frame.right);
+ if (IsEventLogging())
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile Transform %lux%lu ==> %s",
+ tile_image->columns,tile_image->rows,
+ geometry);
+ if (TransformImage(&tile_image,(char *) NULL,geometry) != MagickPass)
+ {
+ if (IsEventLogging())
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile transform failed!");
+ }
+ if (IsEventLogging())
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile Composite of %lux%lu on canvas %lux%lu at +%u,+%u",
+ tile_image->columns,tile_image->rows,
+ image->columns,image->rows,frame.left,frame.right);
+ if (CompositeImage(image,CopyCompositeOp,tile_image,frame.left,
+ frame.right) != MagickPass)
+ {
+ if (IsEventLogging())
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Tile composite failed!");
+ }
image->compression=tile_image->compression;
DestroyImage(tile_image);
tile_image=(Image *) NULL;
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
#define PictVersion 0x11
double
- x_resolution,
- y_resolution;
+ x_resolution = 72.0,
+ y_resolution = 72.0;
long
y;
pixmap.table=0;
pixmap.reserved=0;
transfer_mode=0;
- x_resolution=image->x_resolution ? image->x_resolution : 72.0;
- y_resolution=image->y_resolution ? image->y_resolution : 72.0;
+ if ((image->x_resolution > MagickEpsilon) &&
+ (image->y_resolution > MagickEpsilon))
+ {
+ x_resolution=image->x_resolution;
+ y_resolution=image->y_resolution;
+ if (image->units == PixelsPerCentimeterResolution)
+ {
+ x_resolution *= 2.54;
+ y_resolution *= 2.54;
+ }
+ x_resolution=ConstrainToRange(0.0,(double) 0xffff,x_resolution);
+ y_resolution=ConstrainToRange(0.0,(double) 0xffff,y_resolution);
+ }
storage_class=image->storage_class;
if (image->compression == JPEGCompression)
storage_class=DirectClass;
bytes_per_line=(size_t) image->columns;
if (storage_class == DirectClass)
bytes_per_line = MagickArraySize(bytes_per_line, image->matte ? 4 : 3);
- if ((bytes_per_line == 0) || (bytes_per_line > 0x7FFF))
+ if ((bytes_per_line == 0) || (bytes_per_line > 0x7FFFU) || ((row_bytes+MaxCount*2U) >= 0x7FFFU))
ThrowPICTWriterException(CoderError,UnsupportedNumberOfColumns,image);
#if defined(PTRDIFF_MAX)
/*
ThrowPICTWriterException(ResourceLimitError,MemoryAllocationFailed,image);
#endif /* if defined(PTRDIFF_MAX) */
buffer=MagickAllocateMemory(unsigned char *,PictInfoSize);
- packed_scanline=MagickAllocateMemory(unsigned char *,row_bytes+MaxCount);
+ packed_scanline=MagickAllocateMemory(unsigned char *,row_bytes+MaxCount*2U);
scanline=MagickAllocateMemory(unsigned char *,row_bytes);
if ((buffer == (unsigned char *) NULL) ||
(packed_scanline == (unsigned char *) NULL) ||
red=scanline;
green=scanline+image->columns;
- blue=scanline+2*image->columns;
- opacity=scanline+3*image->columns;
+ blue=scanline+ (size_t)2*image->columns;
+ opacity=scanline+ (size_t)3*image->columns;
for (y=0; y < (long) image->rows; y++)
{
p=AcquireImagePixels(image,0,y,image->columns,1,&image->exception);
break;
red=scanline;
green=scanline+image->columns;
- blue=scanline+2*image->columns;
+ blue=scanline+ (size_t)2*image->columns;
if (image->matte)
{
opacity=scanline;
red=scanline+image->columns;
- green=scanline+2*image->columns;
- blue=scanline+3*image->columns;
+ green=scanline+ (size_t)2*image->columns;
+ blue=scanline+ (size_t)3*image->columns;
}
for (x=0; x < (long) image->columns; x++)
{
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
if (image->storage_class == PseudoClass)
(void) SyncImage(image);
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003-2017 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
DestroyImageInfo(clone_info);
if (image == (Image *) NULL)
return(image);
+ ContinueTimer(&image->timer);
+ (void) strlcpy(image->filename,image_info->filename,sizeof(image->filename));
image->storage_class=DirectClass;
for (y=0; y < (long) image->rows; y++)
{
if (PlasmaImage(image,&segment_info,0,depth))
break;
}
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
" Reading PNG IDAT chunk(s)");
if (num_passes > 1)
{
- if (ping_rowbytes < GetMagickResourceLimit(MemoryResource)/image->rows)
+ if (ping_rowbytes < (size_t) GetMagickResourceLimit(MemoryResource)/image->rows)
mng_info->png_pixels=MagickAllocateArray(unsigned char *,
ping_rowbytes,image->rows);
else
}
else
{
- if ((magick_int64_t)ping_rowbytes < GetMagickResourceLimit(MemoryResource))
+ if (ping_rowbytes < (size_t) GetMagickResourceLimit(MemoryResource))
mng_info->png_pixels=MagickAllocateMemory(unsigned char *, ping_rowbytes);
else
png_error(ping, "png_rowbytes array exceeds MemoryResource");
SetMagickResourceLimit(WidthResource,width_resource);
SetMagickResourceLimit(HeightResource,height_resource);
+ StopTimer(&image->timer);
+
return (image);
}
#endif
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
*/
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
AllocateNextImage(image_info,image);
if (image->next == (Image *) NULL)
{
{
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
{
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
first_mng_object=MagickFalse;
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
" background layer.");
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
/* Write one JNG image */
static MagickPassFail WriteOneJNGImage(MngInfo *mng_info,
- const ImageInfo *image_info,Image *image)
+ const ImageInfo *image_info,Image *image)
{
Image
*jpeg_image;
logging=LogMagickEvent(CoderEvent,GetMagickModule(),
" enter WriteOneJNGImage()");
- if (image->columns > 65535 || image->rows > 65535)
+ if (image->columns > 65500U)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " JNG dimensions too large");
- ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,
+ " JNG dimensions too large"
+ " (%lu columns exceeds limit of 65500)",
+ image->columns);
+ ThrowWriterException(CoderError,UnsupportedNumberOfColumns,
+ image);
+ }
+ if (image->rows > 65500U)
+ {
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ " JNG dimensions too large"
+ " (%lu rows exceeds limit of 65500)",
+ image->rows);
+ ThrowWriterException(CoderError,UnsupportedNumberOfRows,
image);
}
" Creating blob.");
blob=(char *) ImageToBlob(jpeg_image_info,jpeg_image,&length,
&image->exception);
+ if (blob == (char *) NULL)
+ {
+ if (jpeg_image != (Image *)NULL)
+ DestroyImage(jpeg_image);
+ if (jpeg_image_info != (ImageInfo *)NULL)
+ DestroyImageInfo(jpeg_image_info);
+ return MagickFail;
+ }
if (logging)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
status=WriteOneJNGImage(mng_info,image_info,image);
CloseBlob(image);
- (void) CatchImageException(image);
MngInfoFreeStruct(mng_info,&have_mng_structure);
if (logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"exit WriteJNGImage()");
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
}
else
{
- bytes_per_row=MagickArraySize(((bits_per_sample+7)/8)*
+ bytes_per_row=MagickArraySize((((size_t) bits_per_sample+7)/8)*
samples_per_pixel,image->columns);
}
default:
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
}
else
{
- bytes_per_row=MagickArraySize(((bits_per_sample+7)/8)*
+ bytes_per_row=MagickArraySize((((size_t) bits_per_sample+7)/8)*
samples_per_pixel,image->columns);
}
{
case RotatePreview:
{
- FormatString(factor,"%.1f",degrees+=45.0);
+ degrees += 45.0;
+ FormatString(factor,"%.1f",degrees);
FormatString(label,"rotate %.1024s",factor);
ReplaceImage(preview_image,RotateImage(preview_image,degrees,
&image->exception));
case GammaPreview:
default:
{
- FormatString(factor,"%g",gamma+=0.4f);
+ gamma += 0.4f;
+ FormatString(factor,"%g",gamma);
FormatString(label,"gamma %.1024s",factor);
(void) GammaImage(preview_image,factor);
break;
}
case OilPaintPreview:
{
- FormatString(factor,"%g",0.5*(i+1));
+ FormatString(factor,"%g",0.5*((double) i+1));
FormatString(label,"paint %.1024s",factor);
- ReplaceImage(preview_image,OilPaintImage(preview_image,0.5*(i+1),
+ ReplaceImage(preview_image,OilPaintImage(preview_image,0.5*((double) i+1),
&image->exception));
break;
}
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
count=sscanf(command,"%%%%BoundingBox: %lf %lf %lf %lf",&bounds.x1,
&bounds.y1,&bounds.x2,&bounds.y2);
if (LocaleNCompare(DocumentMedia,command,strlen(DocumentMedia)) == 0)
- count=sscanf(command,"%%%%DocumentMedia: %*s %lf %lf",&bounds.x2,
+ count=(size_t) sscanf(command,"%%%%DocumentMedia: %*s %lf %lf",&bounds.x2,
&bounds.y2)+2;
if (LocaleNCompare(PageBoundingBox,command,strlen(PageBoundingBox)) == 0)
- count=sscanf(command,"%%%%PageBoundingBox: %lf %lf %lf %lf",
+ count=(size_t) sscanf(command,"%%%%PageBoundingBox: %lf %lf %lf %lf",
&bounds.x1,&bounds.y1,&bounds.x2,&bounds.y2);
if (count != 4)
continue;
/*
Output Postscript header.
*/
+#if defined(HAVE_CTIME_R)
+ char time_buf[26];
+#endif /* defined(HAVE_CTIME_R) */
if (LocaleCompare(image_info->magick,"PS") == 0)
(void) strlcpy(buffer,"%!PS-Adobe-3.0\n",sizeof(buffer));
else
FormatString(buffer,"%%%%Title: (%.1024s)\n",image->filename);
(void) WriteBlobString(image,buffer);
timer=time((time_t *) NULL);
- (void) localtime(&timer);
- (void) strlcpy(date,ctime(&timer),MaxTextExtent);
+#if defined(HAVE_CTIME_R)
+ (void) strlcpy(date,ctime_r(&timer,time_buf),MaxTextExtent);
+#else
+ (void) strlcpy(date,ctime(&timer),MaxTextExtent); /* Thread-unsafe version */
+#endif /* defined(HAVE_CTIME_R) */
date[strlen(date)-1]='\0';
FormatString(buffer,"%%%%CreationDate: (%.1024s)\n",date);
(void) WriteBlobString(image,buffer);
bounds.x1=geometry.x;
bounds.y1=geometry.y;
bounds.x2=geometry.x+x_scale;
- bounds.y2=geometry.y+(geometry.height+text_size);
+ bounds.y2=geometry.y+((size_t) geometry.height+text_size);
if (image_info->adjoin && (image->next != (Image *) NULL))
(void) strlcpy(buffer,"%%%%BoundingBox: (atend)\n",sizeof(buffer));
else
bounds.x1=geometry.x;
if (geometry.y < bounds.y1)
bounds.y1=geometry.y;
- if ((geometry.x+(long) geometry.width-1) > bounds.x2)
- bounds.x2=geometry.x+geometry.width-1;
- if ((geometry.y+(long) (geometry.height+text_size)-1) > bounds.y2)
- bounds.y2=geometry.y+(geometry.height+text_size)-1;
+ if ((geometry.x+((size_t) geometry.width-1)) > bounds.x2)
+ bounds.x2=geometry.x+(size_t) geometry.width-1;
+ if ((geometry.y+((size_t) geometry.height+text_size)-1) > bounds.y2)
+ bounds.y2=geometry.y+((size_t) geometry.height+text_size)-1;
attribute=GetImageAttribute(image,"label");
if (attribute != (const ImageAttribute *) NULL)
(void) WriteBlobString(image,"%%%%PageResources: font Times-Roman\n");
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
/*
Output Postscript header.
*/
- if (LocaleCompare(image_info->magick,"PS2") == 0)
+ #if defined(HAVE_CTIME_R)
+ char time_buf[26];
+#endif /* defined(HAVE_CTIME_R) */
+ if (LocaleCompare(image_info->magick,"PS2") == 0)
(void) strcpy(buffer,"%!PS-Adobe-3.0\n");
else
(void) strcpy(buffer,"%!PS-Adobe-3.0 EPSF-3.0\n");
FormatString(buffer,"%%%%Title: (%.1024s)\n",image->filename);
(void) WriteBlobString(image,buffer);
timer=time((time_t *) NULL);
- (void) localtime(&timer);
- (void) strlcpy(date,ctime(&timer),MaxTextExtent);
+#if defined(HAVE_CTIME_R)
+ (void) strlcpy(date,ctime_r(&timer,time_buf),MaxTextExtent);
+#else
+ (void) strlcpy(date,ctime(&timer),MaxTextExtent); /* Thread-unsafe version */
+#endif /* defined(HAVE_CTIME_R) */
date[strlen(date)-1]='\0';
FormatString(buffer,"%%%%CreationDate: (%.1024s)\n",date);
(void) WriteBlobString(image,buffer);
bounds.x1=geometry.x;
bounds.y1=geometry.y;
- bounds.x2=geometry.x+geometry.width;
- bounds.y2=geometry.y+geometry.height+text_size;
+ bounds.x2=geometry.x+(size_t) geometry.width;
+ bounds.y2=geometry.y+(size_t) geometry.height+text_size;
if (image_info->adjoin && (image->next != (Image *) NULL))
(void) strcpy(buffer,"%%BoundingBox: (atend)\n");
else
bounds.x1=geometry.x;
if (geometry.y < bounds.y1)
bounds.y1=geometry.y;
- if ((geometry.x+(long) geometry.width-1) > bounds.x2)
- bounds.x2=geometry.x+geometry.width-1;
- if ((geometry.y+(long) (geometry.height+text_size)-1) > bounds.y2)
- bounds.y2=geometry.y+(geometry.height+text_size)-1;
+ if ((geometry.x+(size_t) geometry.width-1) > bounds.x2)
+ bounds.x2=geometry.x+(size_t) geometry.width-1;
+ if ((geometry.y+((size_t) geometry.height+text_size)-1) > bounds.y2)
+ bounds.y2=geometry.y+((size_t) geometry.height+text_size)-1;
attribute=GetImageAttribute(image,"label");
if (attribute != (const ImageAttribute *) NULL)
(void) WriteBlobString(image,"%%PageResources: font Times-Roman\n");
/*
Allocate pixel array.
*/
- length=(image->colorspace == CMYKColorspace ? 4 : 3)*
- number_pixels;
+ length=MagickArraySize(image->colorspace == CMYKColorspace ? 4 : 3,
+ number_pixels);
pixels=MagickAllocateMemory(unsigned char *,length);
if (pixels == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image);
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
status=True;
- *length=image->columns*image->rows;
+ *length=MagickArraySize(image->columns,image->rows);
*pixels=MagickAllocateMemory(unsigned char *, *length);
if (*pixels == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
status=True;
- *length=(image->colorspace == CMYKColorspace ? 4 : 3)*image->columns*image->rows;
+ *length=(size_t) (image->colorspace == CMYKColorspace ? 4U : 3U)*MagickArraySize(image->columns,image->rows);
*pixels=MagickAllocateMemory(unsigned char *, *length);
if (*pixels == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image);
*/
if (page == 1)
{
+#if defined(HAVE_CTIME_R)
+ char time_buf[26];
+#endif /* defined(HAVE_CTIME_R) */
/* Postscript magic */
if (LocaleCompare(image_info->magick,"PS3") == 0)
(void) strlcpy(buffer,"%!PS-Adobe-3.0\n", sizeof(buffer));
/* File creation timestamp */
timer=time((time_t *) NULL);
- (void) localtime(&timer);
- (void) strlcpy(date,ctime(&timer),MaxTextExtent);
+#if defined(HAVE_CTIME_R)
+ (void) strlcpy(date,ctime_r(&timer,time_buf),MaxTextExtent);
+#else
+ (void) strlcpy(date,ctime(&timer),MaxTextExtent); /* Thread-unsafe version */
+#endif /* defined(HAVE_CTIME_R) */
date[strlen(date)-1]='\0';
FormatString(buffer,"%%%%CreationDate: %.1024s\n",date);
(void) WriteBlobString(image,buffer);
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
(void) SetMonitorHandler(handler);
if (next_image == (Image *) NULL)
break;
+ StopTimer(&next_image->timer);
FormatString(next_image->filename,"slide_%02ld.sfw",next_image->scene);
if (image == (Image *) NULL)
image=next_image;
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (scanline == (unsigned char *) NULL)
ThrowRGBReaderException(ResourceLimitError,MemoryAllocationFailed,image);
tile_packets=(size_t) packet_size*image->tile_info.width;
- x=(size_t) (packet_size*image->tile_info.x);
+ x=(size_t) packet_size*image->tile_info.x;
/*
Initialize import options.
*/
image->columns,image->rows))
break;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
image->columns,image->rows))
break;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
break;
i++;
}
- count=image->tile_info.height-image->rows-image->tile_info.y;
+ count=(size_t) image->tile_info.height-image->rows-image->tile_info.y;
for (i=0; i < (long) count; i++)
if (ReadBlob(image,tile_packets,scanline) != tile_packets)
break;
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
ThrowRLAReaderException(CorruptImageError,UnexpectedEndOfFile,image);
CloseBlob(image);
MagickFreeMemory(scanlines);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
image->matte=rle_header.Flags & AlphaFlag;
number_planes=rle_header.Ncolors;
number_colormaps=rle_header.Ncmap;
- map_length=(size_t) (1UL << rle_header.Cmaplen);
+ map_length=(size_t) 1 << rle_header.Cmaplen;
(void) memset(background_color,0,sizeof(background_color));
if (rle_header.Flags & NoBackgroundFlag)
arbitrary string.
*/
length=ReadBlobLSBShort(image);
- comment=MagickAllocateMemory(char *,length+1);
+ comment=MagickAllocateMemory(char *,(size_t) length+1);
if (comment == (char *) NULL)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
{
MagickFreeMemory(colormap);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (EOFBlob(image))
ThrowRLEReaderException(CorruptImageError,UnexpectedEndOfFile,image);
}
- offset=((image->rows-y-1)*image->columns*number_planes)+x*number_planes+plane;
+ offset=(((size_t) image->rows-y-1)*image->columns*number_planes)+x*(size_t) number_planes+plane;
operand++;
p=rle_pixels+offset;
for (i=0; i < (unsigned int) operand; i++)
ThrowRLEReaderException(CorruptImageError,UnexpectedEndOfFile,image);
(void) ReadBlobByte(image);
operand++;
- offset=((image->rows-y-1)*image->columns*number_planes)+x*number_planes+plane;
+ offset=(((size_t) image->rows-y-1)*image->columns*number_planes)+x*(size_t) number_planes+plane;
p=rle_pixels+offset;
for (i=0; i < (unsigned int) operand; i++)
{
ThrowRLEReaderException(CorruptImageError,UnexpectedEndOfFile,image);
}
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2016 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
size_t
buffer_size;
+ TimerInfo
+ timer;
+
unsigned int
status;
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ GetTimerInfo(&timer);
image=AllocateImage(image_info);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == False)
image=flipped_image;
}
}
+ StopTimer(&timer);
+ image->timer=timer;
return(image);
}
\f
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
ThrowSGIReaderException(CorruptImageError,UnableToRunlengthDecodeImage,image);
}
- max_packets_alloc_size=MagickArraySize(iris_info.xsize+10U,4U);
+ max_packets_alloc_size=MagickArraySize((size_t) iris_info.xsize+10U,4U);
max_packets=MagickAllocateMemory(unsigned char *,max_packets_alloc_size);
if (max_packets == (unsigned char *) NULL)
ThrowSGIReaderException(ResourceLimitError,MemoryAllocationFailed,
{
for (y=0; y < image->rows; y++)
{
- p=iris_pixels+(image->rows-y-1)*8*image->columns;
+ p=iris_pixels+((size_t)image->rows-y-1)*8*image->columns;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
else
for (y=0; y < image->rows; y++)
{
- p=iris_pixels+(image->rows-y-1)*4*image->columns;
+ p=iris_pixels+((size_t) image->rows-y-1)*4*image->columns;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
{
for (y=0; y < image->rows; y++)
{
- p=iris_pixels+(image->rows-y-1)*8*image->columns;
+ p=iris_pixels+((size_t)image->rows-y-1)*8*image->columns;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
{
for (y=0; y < image->rows; y++)
{
- p=iris_pixels+(image->rows-y-1)*4U*image->columns;
+ p=iris_pixels+((size_t)image->rows-y-1)*4U*image->columns;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
}
} while (0);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
Allocate SGI pixels.
*/
number_pixels=image->columns*image->rows;
- iris_pixels=MagickAllocateMemory(unsigned char *,4*number_pixels);
+ iris_pixels=MagickAllocateMemory(unsigned char *, (size_t)4*number_pixels);
if (iris_pixels == (unsigned char *) NULL)
ThrowSGIWriterException(ResourceLimitError,MemoryAllocationFailed,image);
/*
p=AcquireImagePixels(image,0,y,image->columns,1,&image->exception);
if (p == (const PixelPacket *) NULL)
break;
- q=iris_pixels+((iris_info.ysize-1)-y)*(iris_info.xsize*4);
+ q=iris_pixels+(((size_t)iris_info.ysize-1)-y)*((size_t)iris_info.xsize*4);
for (x=0; x < (long) image->columns; x++)
{
*q++=ScaleQuantumToChar(p->red);
runlength[y+z*iris_info.ysize]=length;
offset+=length;
}
- q+=(iris_info.xsize*4);
+ q+=((size_t)iris_info.xsize*4);
}
/*
Write out line start and length tables and runlength-encoded pixels.
/*
-% Copyright (C) 2003-2017 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
}
DestroyImage(watermark);
(void) SyncImage(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
token[0]='\0';
svg_info=(SVGInfo *) context;
svg_info->n++;
- MagickReallocMemory(double *,svg_info->scale,(svg_info->n+1)*sizeof(double));
+ MagickReallocMemory(double *,svg_info->scale,MagickArraySize((size_t)svg_info->n+1,sizeof(double)));
if (svg_info->scale == (double *) NULL)
{
ThrowException(svg_info->exception,ResourceLimitError,
(void) memset(&svg_info,0xbf,sizeof(SVGInfo));
(void) LiberateTemporaryFile(filename);
+ if (image != (Image *) NULL)
+ StopTimer(&image->timer);
return(image);
}
#endif
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
/*
TGA image comment.
*/
- if ((size_t) (tga_info.id_length+1) != commentsize)
+ if (((size_t) tga_info.id_length+1) != commentsize)
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
if (ReadBlob(image,tga_info.id_length,commentbuffer) != tga_info.id_length)
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
*q++=ScaleQuantumToChar(image->colormap[i].green);
*q++=ScaleQuantumToChar(image->colormap[i].red);
}
- (void) WriteBlob(image,3*tga_info.colormap_length,
+ (void) WriteBlob(image, (size_t)3*tga_info.colormap_length,
(char *) targa_colormap);
MagickFreeMemory(targa_colormap);
}
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
# define LOG_TIFF_BLOB_IO 0
#endif /* !defined(LOG_TIFF_BLOB_IO) */
+/*
+ The number of bytes to try to allocate per uncompressed strip by default.
+ This is used to determine the default number of rows per strip.
+
+ Target that each uncompressed strip is ~1MB.
+ */
+#if !defined(TIFF_BYTES_PER_STRIP)
+# define TIFF_BYTES_PER_STRIP 1048576
+#endif /* !defined(TIFF_BYTES_PER_STRIP) */
+
#if !defined(PREDICTOR_NONE)
#define PREDICTOR_NONE 1
#endif
photometric == PHOTOMETRIC_MINISBLACK) &&
((image_info->type == PaletteType) ||
(image_info->type == PaletteMatteType)) &&
- (MaxColormapSize > MaxValueGivenBits(bits_per_sample))
+ (MaxColormapSize > MaxValueGivenBits(bits_per_sample))
)
)
{
{
/*
QuantumTransferMode reported an error
- */
+ */
ThrowTIFFReaderException(CorruptImageError,ImproperImageHeader,image);
}
}
break;
}
if (image->previous == (Image *) NULL)
- if (QuantumTick(y+sample*image->rows,image->rows*max_sample))
- if (!MagickMonitorFormatted(y+sample*image->rows,
- image->rows*max_sample,exception,
+ if (QuantumTick(y+(magick_int64_t)sample*image->rows, (magick_int64_t)image->rows*max_sample))
+ if (!MagickMonitorFormatted(y+ (magick_int64_t)sample*image->rows,
+ (magick_int64_t)image->rows*max_sample,exception,
LoadImageText,image->filename,
image->columns,image->rows))
break;
p=0;
strip_size=0;
strip_id=0;
- /*
+ /*
Allocate memory for one strip.
*/
strip_size_max=TIFFStripSize(tiff);
if (!AcquireMagickResource(MemoryResource,strip_size_max))
ThrowTIFFReaderException(ResourceLimitError,MemoryAllocationFailed,
- image);
+ image);
strip=MagickAllocateMemory(unsigned char *,(size_t) strip_size_max);
if (strip == (unsigned char *) NULL)
rows_remaining--;
if (image->previous == (Image *) NULL)
- if (QuantumTick(y+image->rows*sample,image->rows*max_sample))
- if (!MagickMonitorFormatted(y+image->rows*sample,image->rows*max_sample,exception,
+ if (QuantumTick(y+(magick_int64_t)image->rows*sample, (magick_int64_t)image->rows*max_sample))
+ if (!MagickMonitorFormatted(y+ (magick_int64_t)image->rows*sample, (magick_int64_t)image->rows*max_sample,exception,
LoadImageText,image->filename,
image->columns,image->rows))
{
*/
if (!AcquireMagickResource(MemoryResource,tile_size_max))
ThrowTIFFReaderException(ResourceLimitError,MemoryAllocationFailed,
- image);
+ image);
tile=MagickAllocateMemory(unsigned char *, (size_t) tile_size_max);
if (tile == (unsigned char *) NULL)
if ((strip_pixels_size == 0) ||
(!AcquireMagickResource(MemoryResource,strip_pixels_size)))
ThrowTIFFReaderException(ResourceLimitError,MemoryAllocationFailed,
- image);
+ image);
strip_pixels=MagickAllocateMemory(uint32 *,strip_pixels_size);
if (strip_pixels == (uint32 *) NULL)
i=(long) Min(rows_per_strip,image->rows-y);
}
i--;
- p=strip_pixels+image->columns*i;
+ p=strip_pixels+(size_t) image->columns*i;
for (x=0; x < image->columns; x++)
{
q->red=ScaleCharToQuantum(TIFFGetR(*p));
/*
Transfer tile to image
*/
- p=tile_pixels+(tile_rows-tile_rows_remaining)*tile_columns;
- q=strip+(x+(tile_rows_remaining-1)*image->columns);
+ p=tile_pixels+(size_t)(tile_rows-tile_rows_remaining)*tile_columns;
+ q=strip+(x+(size_t)(tile_rows_remaining-1)*image->columns);
for ( tile_row=tile_rows_remaining; tile_row != 0; tile_row--)
{
if (image->matte)
p++;
}
p+=tile_columns-tile_columns_remaining;
- q-=(image->columns+tile_columns_remaining);
+ q-=((size_t) image->columns+tile_columns_remaining);
}
if (status == MagickFail)
break;
{
LiberateMagickResource(MemoryResource,pixels_size);
ThrowTIFFReaderException(ResourceLimitError,MemoryAllocationFailed,
- image);
+ image);
}
if (!TIFFReadRGBAImage(tiff,(uint32) image->columns,
(uint32) image->rows,
read_next_frame:
if (status == MagickPass)
{
+ StopTimer(&image->timer);
if (image->depth > QuantumDepth)
image->depth=QuantumDepth;
if ((photometric == PHOTOMETRIC_LOGL) ||
TIFF
*tiff = (TIFF *) NULL;
+ size_t
+ bytes_per_strip_target = TIFF_BYTES_PER_STRIP;
+
uint16
bits_per_sample,
compress_tag,
(void) TIFFSetField(tiff,TIFFTAG_COMPRESSION,compress_tag);
/*
- Obtain recommended rows per strip given current image width,
- bits per sample, samples per pixel, tags, and compression
- specific requirements. Tries to create strips with 8K of
- uncompressed data.
- */
- scanline_size=TIFFScanlineSize(tiff);
- rows_per_strip=TIFFDefaultStripSize(tiff,0);
- if (rows_per_strip < 1)
- rows_per_strip=1;
- /*
- It seems that some programs fail to handle more than 32K or
- 64K strips in an image due to using a 16-bit strip counter.
- The solution is to use a larger strip size. This approach
- might cause excessively large strips for mega-sized images and
- someday we may remove the solution since the problematic
- readers will have expired.
+ Determine rows per strip given current image width, bits per
+ sample, samples per pixel, tags, and compression specific
+ requirements. Tries to create strips with
+ TARGET_BYTES_PER_STRIP of uncompressed data.
*/
- if ((image->rows/rows_per_strip) > 32767)
- rows_per_strip=image->rows/32768;
- if (rows_per_strip < 1)
- rows_per_strip=1;
-
switch (compress_tag)
{
case COMPRESSION_JPEG:
{
/*
- RowsPerStrip must be multiple of 16 for JPEG.
-
- RowsPerStrip is required to be a multiple of 8 times the
- largest vertical sampling factor. If YCbCr subsampling
- is 2,2 then RowsPerStrip must be a multiple of 16.
+ Set JPEG RGB mode since we don't have a suitable YCbCR encoder.
*/
- rows_per_strip=(((rows_per_strip < 16 ? 16 : rows_per_strip)+1)/16)*16;
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"JPEG Quality: %u", (unsigned) image_info->quality);
(void) TIFFSetField(tiff,TIFFTAG_JPEGQUALITY,image_info->quality);
if (IsRGBColorspace(image->colorspace))
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "TIFFTAG_JPEGCOLORMODE: JPEGCOLORMODE_RGB");
+ "TIFFTAG_JPEGCOLORMODE: JPEGCOLORMODE_RGB");
(void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RGB);
}
if (bits_per_sample == 12)
case COMPRESSION_ADOBE_DEFLATE:
{
/*
- Deflate strips compress better up to 32K of data
- (enlarge if necessary)..
- */
- unsigned int
- proposed_rows_per_strip;
-
- proposed_rows_per_strip = (uint32) (32*1024) / Max(scanline_size,1);
- if (proposed_rows_per_strip > rows_per_strip)
- rows_per_strip=proposed_rows_per_strip;
- /*
Use horizontal differencing (type 2) for images which are
likely to be continuous tone. The TIFF spec says that this
usually leads to better compression.
group_three_options=(uint32) strtol(value,(char **)NULL, 10);
}
(void) TIFFSetField(tiff,TIFFTAG_GROUP3OPTIONS,group_three_options);
-
- /*
- It is recommended (but not required) to output FAX as
- one strip. We will limit strip size to 16 megapixels by
- default.
- */
- rows_per_strip=16000000UL/image->columns;
- if (rows_per_strip < 1)
- rows_per_strip=1;
- if (rows_per_strip > image->rows)
- rows_per_strip=(uint32) image->rows;
break;
}
case COMPRESSION_CCITTFAX4:
{
- /*
- It is recommended (but not required) to output FAX as
- one strip. We will limit strip size to 16 megapixels by
- default.
- */
- rows_per_strip=16000000UL/image->columns;
- if (rows_per_strip < 1)
- rows_per_strip=1;
- if (rows_per_strip > image->rows)
- rows_per_strip=(uint32) image->rows;
break;
}
#if defined(COMPRESSION_LZMA)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"LZMA PRESET set to %u", lzma_preset);
- {
- /*
- Provide a default rows-per-strip which is suitably
- tailored for the compression level.
- */
-
- /*
- Strip memory target for various compression preset levels.
- Values are arbitrary. LZMA is a memory and CPU pig.
- */
- static const unsigned int
- lzma_memory_mb[] =
- { /* Level Compress Decompress */
- 1U, /* 1 2 MB 1 MB */
- 4U, /* 2 12 MB 2 MB */
- 4U, /* 3 12 MB 1 MB */
- 4U, /* 4 16 MB 2 MB */
- 6U, /* 5 26 MB 3 MB */
- 10U, /* 6 45 MB 5 MB */
- 18U, /* 7 83 MB 9 MB */
- 34U, /* 8 159 MB 17 MB */
- 66U /* 9 311 MB 33 MB */
- };
-
- rows_per_strip =
- (uint32) ceil((((double) lzma_memory_mb[lzma_preset-1]*
- 1024.0*1024.0*8.0))/
- (((double) bits_per_sample*samples_per_pixel
- *image->columns)))/8.0;
-
- if (rows_per_strip < 1)
- rows_per_strip=1U;
- if (rows_per_strip > image->rows)
- rows_per_strip=image->rows;
- }
-
/*
Use horizontal differencing (type 2) for images which are
likely to be continuous tone. The TIFF spec says that this
#if defined(COMPRESSION_JBIG)
case COMPRESSION_JBIG:
{
- /*
- It is recommended (but not required) to output FAX as
- one strip. We will limit strip size to 16 megapixels by
- default.
- */
- rows_per_strip=16000000UL/image->columns;
- if (rows_per_strip < 1)
- rows_per_strip=1;
- if (rows_per_strip > image->rows)
- rows_per_strip=(uint32) image->rows;
break;
}
#endif /* COMPRESSION_JBIG */
case COMPRESSION_ZSTD:
{
/*
- Larger strips compress better with diminishing returns
- (enlarge if necessary)..
- */
- unsigned int
- proposed_rows_per_strip;
-
- proposed_rows_per_strip = (uint32) (512*1024) / Max(scanline_size,1);
- if (proposed_rows_per_strip > rows_per_strip)
- rows_per_strip=proposed_rows_per_strip;
- /*
Use horizontal differencing (type 2) for images which are
likely to be continuous tone. The TIFF spec says that this
usually leads to better compression.
#if defined(COMPRESSION_WEBP)
case COMPRESSION_WEBP:
{
- /*
- Larger strips compress better with diminishing returns
- (enlarge if necessary)..
- */
- unsigned int
- proposed_rows_per_strip;
-
- proposed_rows_per_strip = (uint32) (1024*1024) / Max(scanline_size,1);
- if (proposed_rows_per_strip > rows_per_strip)
- rows_per_strip=proposed_rows_per_strip;
-
/* TIFFTAG_WEBP_LEVEL */
if (image_info->quality != DefaultCompressionQuality)
{
{
int lossless=(LocaleCompare(value,"TRUE") == 0 ? 1 : 0);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "TIFFTAG_WEBP_LOSSLESS: %d", lossless);
+ "TIFFTAG_WEBP_LOSSLESS: %d", lossless);
(void) TIFFSetField(tiff,TIFFTAG_WEBP_LOSSLESS,lossless);
}
}
}
}
+ scanline_size=TIFFScanlineSize(tiff);
+ /* (void) LogMagickEvent(CoderEvent,GetMagickModule(),"TIFFScanlineSize(): %lu", (unsigned long) scanline_size); */
+ rows_per_strip=TIFFDefaultStripSize(tiff,0);
+ /* (void) LogMagickEvent(CoderEvent,GetMagickModule(),"TIFFDefaultStripSize(): %lu", (unsigned long) rows_per_strip); */
+
+ switch (compress_tag)
+ {
+ case COMPRESSION_CCITTFAX3:
+ case COMPRESSION_CCITTFAX4:
+#if defined(COMPRESSION_JBIG)
+ case COMPRESSION_JBIG:
+#endif /* COMPRESSION_JBIG */
+ {
+ /*
+ It is recommended (but not required) to output FAX/JBIG
+ as one strip. We will limit strip size to 32 megapixels
+ (4MiB) by default.
+ */
+ bytes_per_strip_target = 4*TIFF_BYTES_PER_STRIP;
+ break;
+ }
+#if defined(COMPRESSION_LZMA)
+ case COMPRESSION_LZMA:
+ {
+ uint32
+ lzma_preset = 0;
+
+ /*
+ Strip memory target for various compression preset levels.
+ Values are arbitrary. LZMA is a memory and CPU pig.
+ */
+ static const unsigned int
+ lzma_memory_mb[] =
+ { /* Level Compress Decompress */
+ 1U, /* 1 2 MB 1 MB */
+ 4U, /* 2 12 MB 2 MB */
+ 4U, /* 3 12 MB 1 MB */
+ 4U, /* 4 16 MB 2 MB */
+ 6U, /* 5 26 MB 3 MB */
+ 10U, /* 6 45 MB 5 MB */
+ 18U, /* 7 83 MB 9 MB */
+ 34U, /* 8 159 MB 17 MB */
+ 66U /* 9 311 MB 33 MB */
+ };
+
+ (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_LZMAPRESET,&lzma_preset);
+ bytes_per_strip_target = (size_t) lzma_memory_mb[lzma_preset-1]*1024*1024;
+ break;
+ }
+#endif /* COMPRESSION_LZMA */
+ default:
+ {
+ }
+ }
+
+ if (scanline_size < (tsize_t) bytes_per_strip_target)
+ rows_per_strip *= (uint32) ((size_t) bytes_per_strip_target / ((size_t) rows_per_strip*scanline_size));
+ if (rows_per_strip > image->rows)
+ rows_per_strip=image->rows;
+ if (rows_per_strip < 1)
+ rows_per_strip=1;
+
+ /*
+ It seems that some programs fail to handle more than 32K or
+ 64K strips in an image due to using a 16-bit strip counter.
+ The solution is to use a larger strip size. This approach
+ might cause excessively large strips for mega-sized images and
+ someday we may remove the solution since the problematic
+ readers will have expired.
+ */
+ if ((image->rows/rows_per_strip) > 32767)
+ rows_per_strip=image->rows/32768;
+ if (rows_per_strip < 1)
+ rows_per_strip=1;
+
/*
Allow the user to specify the predictor (at their own peril)
*/
{
const char *
- value;
+ value;
if ((value=AccessDefinition(image_info,"tiff","predictor")))
predictor=(unsigned short) MagickAtoI(value);
}
if (image->previous == (Image *) NULL)
- if (QuantumTick(y+sample*image->rows,image->rows*max_sample))
- if (!MagickMonitorFormatted(y+sample*image->rows,
- image->rows*max_sample,&image->exception,
+ if (QuantumTick(y+(magick_int64_t)sample*image->rows, (magick_int64_t)image->rows*max_sample))
+ if (!MagickMonitorFormatted(y+ (magick_int64_t)sample*image->rows,
+ (magick_int64_t)image->rows*max_sample,&image->exception,
SaveImageText,image->filename,
image->columns,image->rows))
{
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
RectangleInfo
geometry;
+ TimerInfo
+ timer;
/*
Initialize Image structure.
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ GetTimerInfo(&timer);
clone_info=CloneImageInfo(image_info);
clone_info->blob=(void *) NULL;
clone_info->length=0;
(void) GetGeometry(image_info->size,&geometry.x,&geometry.y,&geometry.width,
&geometry.height);
image=ConstituteTextureImage(geometry.width,geometry.height,tile_image,exception);
-
DestroyImage(tile_image);
+ if (image)
+ {
+ StopTimer(&timer);
+ image->timer=timer;
+ }
+
return(image);
}
\f
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (!AllocateImageColormap(image,pixel_mode == 1 ? 256 : 16))
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,
image);
- tim_colormap=MagickAllocateMemory(unsigned char *,image->colors*2);
+ tim_colormap=MagickAllocateMemory(unsigned char *, (size_t)image->colors*2);
if (tim_colormap == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,
image);
- if (ReadBlob(image,2*image->colors,(char *) tim_colormap) != 2*image->colors)
+ if (ReadBlob(image, (size_t)2*image->colors,(char *) tim_colormap) != (size_t)2*image->colors)
{
MagickFreeMemory(tim_colormap);
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
break;
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t)image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
break;
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t)image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
break;
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t)image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
break;
if (QuantumTick(y,image->rows))
{
- status=MagickMonitorFormatted(image->rows-y-1,image->rows,
+ status=MagickMonitorFormatted((size_t)image->rows-y-1,image->rows,
exception,LoadImageText,
image->filename,
image->columns,image->rows);
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
#include "magick/blob.h"
#include "magick/colormap.h"
#include "magick/constitute.h"
+#include "magick/magick_endian.h"
#include "magick/error.h"
#include "magick/list.h"
#include "magick/magick.h"
/* if (EOFBlob(image))
ThrowTOPOLReaderException(CorruptImageError,UnexpectedEndOfFile,image); */
CloseBlob(image);
+ StopTimer(&image->timer);
if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),"return");
return (image);
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
DestroyDrawInfo(draw_info);
DrawDestroyContext(context);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif /* HasTTF */
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
packet_size=40.0; /* Max characters in a row */
double
- number_pixels=image->columns*image->rows;
+ number_pixels=(double) image->columns*image->rows;
ratio = (((double) number_pixels*packet_size)/file_size);
SetImage(image,OpaqueOpacity);
BImgBuff = MagickAllocateArray(unsigned char *,
- (size_t)(x+1),
- ( ((image->matte) ? 4 : 3)
+ ((size_t)x+1),
+ ((size_t)((image->matte) ? 4 : 3)
* NumOfPlanes/8));
WImgBuff = (magick_uint16_t *)BImgBuff;
DImgBuff = (magick_uint32_t *)BImgBuff;
if (image->matte)
(void)ImportImagePixelArea(image,RGBAQuantum,NumOfPlanes,
- BImgBuff + 4*x_min*(NumOfPlanes/8),
+ BImgBuff + (size_t)4*x_min*(NumOfPlanes/8),
&import_options,0);
else
(void)ImportImagePixelArea(image,RGBQuantum,NumOfPlanes,
- BImgBuff + 3*x_min*(NumOfPlanes/8),
+ BImgBuff + (size_t)3*x_min*(NumOfPlanes/8),
&import_options,0);
if (!SyncImagePixels(image))
break;
{
if (image->matte)
(void)ImportImagePixelArea(image, RGBAQuantum, NumOfPlanes,
- BImgBuff + 4*x_min*(NumOfPlanes/8),
+ BImgBuff + (size_t)4*x_min*(NumOfPlanes/8),
&import_options, 0);
else
(void)ImportImagePixelArea(image, RGBQuantum, NumOfPlanes,
- BImgBuff + 3*x_min*(NumOfPlanes/8),
+ BImgBuff + (size_t)3*x_min*(NumOfPlanes/8),
&import_options, 0);
if (!SyncImagePixels(image))
{
if (p == (char *) NULL)
break;
+ StopTimer(&image->timer);
+
if (logging)
(void)LogMagickEvent(CoderEvent,GetMagickModule(),
"page %ld scene %ld ",page_num, image->scene);
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (CheckImagePixelLimits(image, exception) != MagickPass)
if (EOFBlob(image))
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2015 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
MagickFreeMemory(filelist[i]); \
MagickFreeMemory(filelist); \
} \
- MagickFreeMemory(list[0]); \
+ if (list != (char **) NULL) \
+ MagickFreeMemory(list[0]); \
MagickFreeMemory(list); \
}
RectangleInfo
geometry;
+ TimerInfo
+ timer;
+
register long
i;
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ GetTimerInfo(&timer);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"enter");
image=AllocateImage(image_info);
list=MagickAllocateMemory(char **,sizeof(char *));
DestroyImageList(image);
LiberateVIDLists();
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"return");
+ StopTimer(&timer);
+ montage_image->timer=timer;
return(montage_image);
}
\f
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
{
case VFF_MAPTYP_2_BYTE:
{
- MSBOrderShort(viff_colormap,(bytes_per_pixel*image->colors*
+ MSBOrderShort(viff_colormap,((size_t)bytes_per_pixel*image->colors*
viff_info.map_rows));
break;
}
case VFF_MAPTYP_4_BYTE:
case VFF_MAPTYP_FLOAT:
{
- MSBOrderLong(viff_colormap,(bytes_per_pixel*image->colors*
+ MSBOrderLong(viff_colormap,((size_t)bytes_per_pixel*image->colors*
viff_info.map_rows));
break;
}
/*
Convert DirectColor scanline.
*/
- number_pixels=image->columns*image->rows;
+ number_pixels=(size_t)image->columns*image->rows;
for (y=0; y < (long) image->rows; y++)
{
q=SetImagePixels(image,0,y,image->columns,1);
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
for (x=0; x < (long) image->columns; x++)
{
*q=ScaleQuantumToChar(p->red);
- *(q+number_pixels)=ScaleQuantumToChar(p->green);
- *(q+number_pixels*2)=ScaleQuantumToChar(p->blue);
+ *(q+ (size_t)number_pixels)=ScaleQuantumToChar(p->green);
+ *(q+ (size_t)number_pixels*2)=ScaleQuantumToChar(p->blue);
if (image->matte)
- *(q+number_pixels*3)=ScaleQuantumToChar(MaxRGB-p->opacity);
+ *(q+ (size_t)number_pixels*3)=ScaleQuantumToChar(MaxRGB-p->opacity);
p++;
q++;
}
*q++=ScaleQuantumToChar(image->colormap[i].green);
for (i=0; i < (long) image->colors; i++)
*q++=ScaleQuantumToChar(image->colormap[i].blue);
- (void) WriteBlob(image,3*image->colors,(char *) viff_colormap);
+ (void) WriteBlob(image, (size_t)3*image->colors,(char *) viff_colormap);
MagickFreeMemory(viff_colormap);
/*
Convert PseudoClass packet to VIFF colormapped pixels.
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2013-2019 GraphicsMagick Group
+% Copyright (C) 2013-2020 GraphicsMagick Group
%
% This program is covered by multiple licenses, which are described in
% Copyright.txt. You should have received a copy of Copyright.txt with this
{
MagickFreeMemory(stream);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (CheckImagePixelLimits(image, exception) != MagickPass)
pixels=(unsigned char *) NULL;
MagickFreeMemory(stream);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif
for (y = 0; y < image->rows; y++)
{
- magick_uint32_t *s = picture.argb + y * picture.argb_stride;
+ magick_uint32_t *s = picture.argb + (size_t)y * picture.argb_stride;
p=GetImagePixelsEx(image,0,y,image->columns,1,&image->exception);
if (p == (const PixelPacket *) NULL)
break;
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
ipa_device_close(API);
(void) wmf_api_destroy(API);
CloseBlob(image);
- if(logging)
+ StopTimer(&image->timer);
+ if (logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"leave ReadWMFImage()");
return(image);
}
/* Cleanup allocated data */
(void) wmf_api_destroy(API);
CloseBlob(image);
+ StopTimer(&image->timer);
/* Check for and report any rendering error */
if(image->exception.severity != UndefinedException)
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
static void ZeroFillMissingData(unsigned char *BImgBuff,unsigned long x, unsigned long y, Image *image,
int bpp, long ldblk)
{
- while(y < image->rows)
+ while(y<image->rows && image->exception.severity!=UndefinedException)
{
- if((long) x<ldblk) memset(BImgBuff+x, 0, ldblk-(long)x);
- if (InsertRow(BImgBuff,y,image,bpp) == MagickFail)
+ if((long) x<ldblk)
+ {
+ memset(BImgBuff+x, 0, (size_t)ldblk-(size_t)x);
+ if(x == 0)
+ x = ldblk; /* Do not memset any more */
+ else
+ x = 0; /* Next pass will need to clear whole row */
+ }
+ if(InsertRow(BImgBuff,y,image,bpp) == MagickFail)
break;
- x = 0;
y++;
}
}
{ /* Here I need to duplicate previous row RUNCOUNT* */
/* when x=0; y points to a new empty line. For y=0 zero line will be populated. */
if(y>=image->rows)
- {
- ZeroFillMissingData(BImgBuff,x,y,image,bpp,ldblk);
+ {
MagickFreeMemory(BImgBuff);
return(-4);
}
if(InsertRow(BImgBuff,y,image,bpp)==MagickFail)
- {
+ {
ZeroFillMissingData(BImgBuff,x,y,image,bpp,ldblk);
MagickFreeMemory(BImgBuff);
return(-6);
}
}
+ StopTimer(&image->timer);
+
if (image_info->subrange != 0)
if (image->scene >= (image_info->subimage+image_info->subrange-1))
goto Finish;
{
ldblk=(long) ((bpp*image->columns+7)/8);
BImgBuff=MagickAllocateMemory(unsigned char *,(size_t) ldblk);
- if (BImgBuff == (unsigned char *) NULL)
+ if(BImgBuff == (unsigned char *) NULL)
goto NoMemory;
for(i=0; i< (long) image->rows; i++)
Tx(2,2)=1; */
}
+ StopTimer(&image->timer);
+
if (image_info->subrange != 0)
if (image->scene >= (image_info->subimage+image_info->subrange-1))
goto Finish;
if(Rec2.RecordLength > ((unsigned long) i+2))
image=ExtractPostscript(image,image_info,
TellBlob(image)+i, /*skip PS header in the wpg2*/
- (size_t) (Rec2.RecordLength-i-2),exception);
+ (size_t)Rec2.RecordLength-i-2,exception);
break;
case 0x1B: /*bitmap rectangle*/
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (CheckImagePixelLimits(image, exception) != MagickPass)
padding=0;
if ((image->columns % 16) && ((image->columns % 16) < 9) && (version == 10))
padding=1;
- bytes_per_line=(image->columns+7)/8+padding;
+ bytes_per_line=((size_t) image->columns+7)/8+padding;
data=MagickAllocateArray(unsigned char *,image->rows,bytes_per_line);
if (data == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
MagickFreeMemory(data);
(void) SyncImage(image);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
&image->background_color,exception);
if (status == MagickFail)
{
+ /* Promote warning to error */
+ exception->severity = OptionError;
DestroyImage(image);
return ((Image *) NULL);
}
DestroyImage(image);
image=(Image *) NULL;
}
+ else
+ {
+ StopTimer(&image->timer);
+ }
return image;
}
/*
-% Copyright (C) 2003 - 2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
if (inDocInfo->image_type == GIMP_GRAY)
{
- expected_data_length=tile_image->columns*tile_image->rows*
+ expected_data_length=MagickArraySize(tile_image->columns,tile_image->rows)*
sizeof(unsigned char);
}
else if (inDocInfo->image_type == GIMP_RGB)
{
- expected_data_length=tile_image->columns*tile_image->rows*
+ expected_data_length=MagickArraySize(tile_image->columns,tile_image->rows)*
sizeof(XCFPixelPacket);
}
if (expected_data_length && (expected_data_length > data_length))
CopyException(&image->exception,&tile_image->exception);
goto bogus_rle;
}
- size = tile_image->rows * tile_image->columns;
+ size = MagickArraySize(tile_image->rows,tile_image->columns);
count = 0;
while (size > 0)
/*
If compression is not used then enforce expected tile size.
*/
- tile_data_size = tile_image->columns*tile_image->rows*packet_size;
+ tile_data_size = MagickArraySize(MagickArraySize(tile_image->columns,tile_image->rows),packet_size);
}
else
{
Then we truncate to the file length, whichever is
smallest.
*/
- offset2 = offset + tile_image->columns*tile_image->rows * packet_size * 1.5;
+ offset2 = (magick_off_t) ((double) offset + (double) tile_image->columns*tile_image->rows * packet_size * 1.5);
tile_data_size = (size_t) offset2-offset;
if (image->logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
CloseBlob(image);
if ( image_type == GIMP_GRAY )
image->is_grayscale=MagickTrue;
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
register long
i;
- unsigned int
+ MagickPassFail
status;
+ MagickBool
+ colormap_initialized;
+
size_t
length;
none=(~0U);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"Parsing colormap...");
+ colormap_initialized=MagickFalse;
for (j=0; j < image->colors; j++)
{
p=textlist[i++];
" %lu: %s", i-1, textlist[i-1]);
if (strlen(p) < width)
break;
- keys[j]=MagickAllocateMemory(char *,width+1);
+ keys[j]=MagickAllocateMemory(char *,(size_t) width+1);
if (keys[j] == (char *) NULL)
ThrowXPMReaderException(ResourceLimitError,MemoryAllocationFailed,image);
keys[j][width]='\0';
(void) strcpy(target,"black");
}
if (!QueryColorDatabase(target,&image->colormap[j],exception))
- break;
+ {
+ /* Promote warning to error */
+ exception->severity = CorruptImageError;
+ break;
+ }
+ /* We are going to be done now */
+ if (j+1 == image->colors)
+ colormap_initialized=MagickTrue;
}
- if (j < image->colors)
+ if (!colormap_initialized)
ThrowXPMReaderException(CorruptImageError,CorruptImage,image);
image->depth=GetImageDepth(image,&image->exception);
image->depth=NormalizeDepthToOctet(image->depth);
MagickFreeMemory(textlist);
MagickFreeMemory(xpm_buffer);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
\f
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
MagickFreeMemory(ximage->data);
MagickFreeMemory(ximage);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif
/*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
Allocate memory for a scanline.
*/
if (interlace == NoInterlace)
- scanline=MagickAllocateMemory(unsigned char *,2*image->columns+2);
+ scanline=MagickAllocateMemory(unsigned char *,(size_t) 2*image->columns+2);
else
scanline=MagickAllocateMemory(unsigned char *,image->columns);
if (scanline == (unsigned char *) NULL)
if (interlace == NoInterlace)
{
if ((y > 0) || (image->previous == (Image *) NULL))
- (void) ReadBlob(image,2*image->columns,scanline);
+ (void) ReadBlob(image,(size_t)2*image->columns,scanline);
p=scanline;
q=SetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
if (image->scene >= (image_info->subimage+image_info->subrange-1))
break;
if (interlace == NoInterlace)
- count=ReadBlob(image,2*image->columns,(char *) scanline);
+ count=ReadBlob(image, (size_t)2*image->columns,(char *) scanline);
else
count=ReadBlob(image,image->columns,(char *) scanline);
if (count != 0)
# Check standard headers
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
# Check additional headers
-for ac_header in machine/param.h mach-o/dyld.h process.h sun_prefetch.h sys/mman.h sys/resource.h sys/times.h sys/types.h
+for ac_header in inttypes.h machine/param.h mach-o/dyld.h process.h stdint.h sun_prefetch.h sys/mman.h sys/resource.h sys/times.h sys/types.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
for ac_func in atoll CryptGenRandom \
clock_getres clock_gettime ctime_r cosf _exit fabsf fcntl fstatvfs ftime getexecname \
- getc_unlocked getpagesize getrlimit getpid lltostr localtime_r logf madvise \
+ getc_unlocked getpagesize getpwnam_r getrlimit getpid lltostr localtime_r logf madvise \
_NSGetExecutablePath _pclose pclose poll _popen popen posix_fadvise \
posix_fallocate posix_madvise posix_memalign posix_spawnp pread pwrite \
putc_unlocked raise rand_r readdir_r readlink realpath select seekdir \
-# Copyright (C) 2003-2019 GraphicsMagick Group
+# Copyright (C) 2003-2020 GraphicsMagick Group
# Copyright (C) 2002 ImageMagick Studio
# Copyright (C) 1998, 1999 E. I. du Pont de Nemours and Company
#
AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
# Check standard headers
-AC_HEADER_STDC
AC_HEADER_DIRENT
# Check additional headers
-AC_CHECK_HEADERS([machine/param.h mach-o/dyld.h process.h sun_prefetch.h sys/mman.h sys/resource.h sys/times.h sys/types.h])
+AC_CHECK_HEADERS([inttypes.h machine/param.h mach-o/dyld.h process.h stdint.h sun_prefetch.h sys/mman.h sys/resource.h sys/times.h sys/types.h])
AC_CHECK_HEADERS([wincrypt.h],[],[],[#include <windows.h>])
case "${host_os}" in
GM_FUNC_MMAP_FILEIO
AC_CHECK_FUNCS([atoll CryptGenRandom \
clock_getres clock_gettime ctime_r cosf _exit fabsf fcntl fstatvfs ftime getexecname \
- getc_unlocked getpagesize getrlimit getpid lltostr localtime_r logf madvise \
+ getc_unlocked getpagesize getpwnam_r getrlimit getpid lltostr localtime_r logf madvise \
_NSGetExecutablePath _pclose pclose poll _popen popen posix_fadvise \
posix_fallocate posix_madvise posix_memalign posix_spawnp pread pwrite \
putc_unlocked raise rand_r readdir_r readlink realpath select seekdir \
Unsupported number of columns
</Message>
<Message name="UnsupportedNumberOfRows">
- Unsupported number of columns
+ Unsupported number of rows
</Message>
<Message name="ArithmeticOverflow">
Arithmetic overflow
-# Copyright (C) 2004-2019 GraphicsMagick Group
+# Copyright (C) 2004-2020 GraphicsMagick Group
# This program is covered by multiple licenses, which are described in
# Copyright.txt. You should have received a copy of Copyright.txt with this
MAGICK_NOINST_HDRS = \
magick/alpha_composite.h \
+ magick/attribute-private.h \
magick/bit_stream.h \
+ magick/color-private.h \
+ magick/color_lookup-private.h \
+ magick/colormap-private.h \
+ magick/command-private.h \
+ magick/constitute-private.h \
+ magick/delegate-private.h \
+ magick/error-private.h \
magick/floats.h \
magick/image-private.h \
magick/locale_c.h \
+ magick/log-private.h \
+ magick/magic-private.h \
+ magick/magick-private.h \
magick/map.h \
+ magick/memory-private.h \
+ magick/module-private.h \
magick/module_aliases.h \
+ magick/monitor-private.h \
magick/nt_base.h \
magick/nt_feature.h \
magick/omp_data_view.h \
magick/pixel_cache-private.h \
magick/prefetch.h \
magick/random-private.h \
+ magick/registry-private.h \
+ magick/render-private.h \
magick/semaphore.h \
magick/spinlock.h \
magick/static.h \
magick/studio.h \
+ magick/tempfile-private.h \
magick/tempfile.h \
+ magick/type-private.h \
magick/unix_port.h \
+ magick/utility-private.h \
magick/widget.h \
magick/xwindow.h
/*
- Copyright (C) 2003 - 2009 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
extern MagickExport RectangleInfo
GetImageBoundingBox(const Image *,ExceptionInfo *exception);
-#if defined(MAGICK_IMPLEMENTATION)
-
-
-#endif /* defined(MAGICK_IMPLEMENTATION) */
-
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif /* defined(__cplusplus) || defined(c_plusplus) */
for (p=text; *p != '\0'; p++)
if (*p == '\n')
number_lines++;
- textlist=MagickAllocateMemory(char **,(number_lines+1)*sizeof(char *));
+ textlist=MagickAllocateArray(char **,((size_t) number_lines+1),sizeof(char *));
if (textlist == (char **) NULL)
MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed,
UnableToConvertText);
case NorthWestGravity:
default:
{
- offset.x=geometry.x+i*draw_info->affine.ry*height;
- offset.y=geometry.y+i*draw_info->affine.sy*height;
+ offset.x=(double)geometry.x+(double)i*draw_info->affine.ry*height;
+ offset.y=(double)geometry.y+(double)i*draw_info->affine.sy*height;
break;
}
case NorthGravity:
{
- offset.x=geometry.x+geometry.width/2+i*draw_info->affine.ry*height-
- draw_info->affine.sx*metrics.width/2;
- offset.y=geometry.y+i*draw_info->affine.sy*height-draw_info->affine.rx*
- metrics.width/2;
+ offset.x=(double)geometry.x+(double)geometry.width/2+(double)i*draw_info->affine.ry*height-
+ (double)draw_info->affine.sx*metrics.width/2.0;
+ offset.y=(double)geometry.y+(double)i*draw_info->affine.sy*height-draw_info->affine.rx*
+ metrics.width/2.0;
break;
}
case NorthEastGravity:
{
- offset.x=(geometry.width == 0 ? 1 : -1)*geometry.x+geometry.width+i*
- draw_info->affine.ry*height-draw_info->affine.sx*metrics.width;
- offset.y=geometry.y+i*draw_info->affine.sy*height-draw_info->affine.rx*
+ offset.x=(geometry.width == 0 ? 1.0 : -1.0)*(double)geometry.x+(double)geometry.width+i*
+ draw_info->affine.ry*height-(double)draw_info->affine.sx*metrics.width;
+ offset.y=(double)geometry.y+(double)i*draw_info->affine.sy*height-(double)draw_info->affine.rx*
metrics.width;
break;
}
case WestGravity:
{
- offset.x=geometry.x+i*draw_info->affine.ry*height+draw_info->affine.ry*
- (metrics.ascent+metrics.descent-(number_lines-1)*height)/2;
- offset.y=geometry.y+geometry.height/2+i*draw_info->affine.sy*height+
- draw_info->affine.sy*(metrics.ascent+metrics.descent-(number_lines-1)*
- height)/2;
+ offset.x=(double)geometry.x+(double)i*draw_info->affine.ry*height+(double)draw_info->affine.ry*
+ (metrics.ascent+metrics.descent-(double)(number_lines-1)*(double) height)/2.0;
+ offset.y=(double) geometry.y+(double)geometry.height/2.0+(double)i*draw_info->affine.sy*height+
+ (double)draw_info->affine.sy*((double)metrics.ascent+metrics.descent-(double)(number_lines-1)*
+ height)/2.0;
break;
}
case StaticGravity:
case CenterGravity:
{
- offset.x=geometry.x+geometry.width/2+i*draw_info->affine.ry*height-
- draw_info->affine.sx*metrics.width/2+draw_info->affine.ry*
- (metrics.ascent+metrics.descent-(number_lines-1)*height)/2;
- offset.y=geometry.y+geometry.height/2+i*draw_info->affine.sy*height-
- draw_info->affine.rx*metrics.width/2+draw_info->affine.sy*
- (metrics.ascent+metrics.descent-(number_lines-1)*height)/2;
+ offset.x=(double)geometry.x+(double)geometry.width/2.0+(double)i*draw_info->affine.ry*height-
+ (double)draw_info->affine.sx*metrics.width/2.0+draw_info->affine.ry*
+ ((double)metrics.ascent+metrics.descent-(double)(number_lines-1)*height)/2.0;
+ offset.y=(double)geometry.y+(double)geometry.height/2.0+(double)i*draw_info->affine.sy*height-
+ (double)draw_info->affine.rx*metrics.width/2.0+(double)draw_info->affine.sy*
+ ((double)metrics.ascent+metrics.descent-(double)(number_lines-1)*height)/2.0;
break;
}
case EastGravity:
{
- offset.x=(geometry.width == 0 ? 1 : -1)*geometry.x+geometry.width+i*
- draw_info->affine.ry*height-draw_info->affine.sx*metrics.width+
- draw_info->affine.ry*(metrics.ascent+metrics.descent-(number_lines-1)*
- height)/2;
- offset.y=geometry.y+geometry.height/2+i*draw_info->affine.sy*height-
- draw_info->affine.rx*metrics.width+draw_info->affine.sy*
- (metrics.ascent+metrics.descent-(number_lines-1)*height)/2;
+ offset.x=(geometry.width == 0 ? 1.0 : -1.0)*(double)geometry.x+(double)geometry.width+(double)i*
+ (double)draw_info->affine.ry*height-(double)draw_info->affine.sx*metrics.width+
+ (double)draw_info->affine.ry*((double)metrics.ascent+(double)metrics.descent-(number_lines-1)*
+ (double)height)/2.0;
+ offset.y=(double)geometry.y+(double)geometry.height/2.0+(double)i*draw_info->affine.sy*height-
+ (double)draw_info->affine.rx*metrics.width+(double)draw_info->affine.sy*
+ ((double)metrics.ascent+metrics.descent-(number_lines-1)*(double)height)/2.0;
break;
}
case SouthWestGravity:
{
- offset.x=geometry.x+i*draw_info->affine.ry*height-draw_info->affine.ry*
+ offset.x= (double)geometry.x+ (double)i*draw_info->affine.ry*height-draw_info->affine.ry*
(number_lines-1)*height;
- offset.y=(geometry.height == 0 ? 1 : -1)*geometry.y+geometry.height+i*
+ offset.y= (double)(geometry.height == 0 ? 1 : -1)*geometry.y+geometry.height+i*
draw_info->affine.sy*height-draw_info->affine.sy*(number_lines-1)*
height;
break;
}
case SouthGravity:
{
- offset.x=geometry.x+geometry.width/2+i*draw_info->affine.ry*
- height-draw_info->affine.sx*metrics.width/2-
- draw_info->affine.ry*(number_lines-1)*height;
- offset.y=(geometry.height == 0 ? 1 : -1)*geometry.y+geometry.height+i*
- draw_info->affine.sy*height-draw_info->affine.rx*
- metrics.width/2-draw_info->affine.sy*(number_lines-1)*height;
+ offset.x= (double)geometry.x+(double)geometry.width/2.0+(double)i*draw_info->affine.ry*
+ height- (double)draw_info->affine.sx*metrics.width/2.0-
+ (double)draw_info->affine.ry*(number_lines-1)*height;
+ offset.y=(geometry.height == 0 ? 1.0 : -1.0)*geometry.y+geometry.height+(double)i*
+ draw_info->affine.sy*height-(double)draw_info->affine.rx*
+ metrics.width/2.0-(double)draw_info->affine.sy*(number_lines-1)*height;
break;
}
case SouthEastGravity:
{
- offset.x=(geometry.width == 0 ? 1 : -1)*geometry.x+geometry.width+i*
- draw_info->affine.ry*height-draw_info->affine.sx*metrics.width-
- draw_info->affine.ry*(number_lines-1)*height;
- offset.y=(geometry.height == 0 ? 1 : -1)*geometry.y+geometry.height+i*
- draw_info->affine.sy*height-draw_info->affine.rx*metrics.width-
- draw_info->affine.sy*(number_lines-1)*height;
+ offset.x=(geometry.width == 0 ? 1.0 : -1.0)*geometry.x+geometry.width+(double)i*
+ draw_info->affine.ry*height-(double)draw_info->affine.sx*metrics.width-
+ (double)draw_info->affine.ry*(number_lines-1)*height;
+ offset.y=(geometry.height == 0 ? 1.0 : -1.0)*geometry.y+(double)geometry.height+i*
+ draw_info->affine.sy*height-(double)draw_info->affine.rx*metrics.width-
+ (double)draw_info->affine.sy*(number_lines-1)*height;
break;
}
}
if (bitmap->bitmap.pixel_mode == ft_pixel_mode_grays)
{
if (draw_info->text_antialias)
- opacity=ScaleCharToQuantum(p[pc]);
+ opacity=ScaleCharToQuantum((double) p[pc]);
else
opacity=(p[pc] < 127 ? OpaqueOpacity : TransparentOpacity);
}
--- /dev/null
+/*
+ Copyright (C) 2003-2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Private Methods to Get/Set/Destroy Image Text Attributes.
+*/
+
+/* Assign value of attribute to double if attribute exists for key */
+#define MagickAttributeToDouble(image,key,variable) \
+{ \
+ const ImageAttribute \
+ *attribute; \
+\
+ if ((attribute=GetImageAttribute(image,key))) \
+ { \
+ variable=strtod(attribute->value,(char **) NULL); \
+ } \
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/* fprintf(stderr,"Skipping record %d\n",profile[i+2]); */
continue;
}
- length=profile[i+3] << 8;
- length|=profile[i+4];
+ length=(size_t) profile[i+3] << 8;
+ length|=(size_t) profile[i+4];
attribute=MagickAllocateMemory(char *,length+1);
if (attribute == (char *) NULL)
continue;
*pde,
*pval;
- pde=(unsigned char *) (ifdp+2+(12*de));
+ pde=(unsigned char *) (ifdp+2+(12*(size_t) de));
if (logging && debug)
(void) LogMagickEvent(TransformEvent,GetMagickModule(),
"EXIF: PDE offset %"MAGICK_SSIZE_T_F"d", (MAGICK_SSIZE_T) (pde-ifdp));
*pval;
- pde=(unsigned char *) (ifdp+2+(12*de));
+ pde=(unsigned char *) (ifdp+2+(12*(size_t) de));
if (pde + 12 > tiffp + length)
{
if (debug)
DestroyImageAttributes(Image *image);
#if defined(MAGICK_IMPLEMENTATION)
-
-/* Assign value of attribute to double if attribute exists for key */
-#define MagickAttributeToDouble(image,key,variable) \
-{ \
- const ImageAttribute \
- *attribute; \
-\
- if ((attribute=GetImageAttribute(image,key))) \
- { \
- variable=strtod(attribute->value,(char **) NULL); \
- } \
-}
-
+# include "magick/attribute-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
const char
*separator;
- int
+ size_t
string_length;
separator = strchr(start,DirectoryListSeparator);
#if defined(HasBZLIB)
if (strncmp((char *) magick,"BZh",3) == 0)
{
- (void) fclose(image->blob->handle.std);
+ if (image->blob->handle.std)
+ (void) fclose(image->blob->handle.std);
image->blob->handle.bz=BZ2_bzopen(filename,type);
if (image->blob->handle.bz != (BZFILE *) NULL)
{
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Private Color Utility Methods.
+*/
+
+/*
+ Macros for testing a pixel to see if it is grayscale, bilevel,
+ black, or white
+*/
+#define IsGray(color) \
+ (((color).red == (color).green) && ((color).red == (color).blue))
+#define IsMonochrome(color) \
+ (((0 == (color).red) || (MaxRGB == (color).red)) && IsGray(color))
+
+#define IsBlackPixel(color) \
+ (((color).red == 0U) && IsGray(color))
+
+#define IsWhitePixel(color) \
+ (((color).red == MaxRGB) && IsGray(color))
+
+/*
+ Compare two colors
+*/
+#define ColorMatch(p,q) \
+ (((p)->red == (q)->red) && \
+ ((p)->green == (q)->green) && \
+ ((p)->blue == (q)->blue))
+
+#define NotColorMatch(p,q) \
+ (((p)->red != (q)->red) || \
+ ((p)->green != (q)->green) || \
+ ((p)->blue != (q)->blue))
+
+extern MagickExport unsigned int
+ FuzzyColorMatch(const PixelPacket *p,const PixelPacket *q,const double fuzz) MAGICK_FUNC_PURE;
+
+/*
+ Compare two pixels (including opacity)
+*/
+#define PixelMatch(p,q,matte) \
+ (ColorMatch(p,q) && \
+ (!matte || ((p)->opacity == (q)->opacity)))
+
+#define NotPixelMatch(p,q,matte) \
+ (NotColorMatch(p,q) || \
+ (matte && ((p)->opacity != (q)->opacity)))
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
sizeof(ColorPacket));
else
MagickReallocMemory(ColorPacket *,node_info->list,
- (i+1)*sizeof(ColorPacket));
+ MagickArraySize((size_t) i+1,sizeof(ColorPacket)));
if (node_info->list == (ColorPacket *) NULL)
{
DestroyCubeInfo(cube_info);
sizeof(ColorPacket));
else
MagickReallocMemory(ColorPacket *,node_info->list,
- (i+1)*sizeof(ColorPacket));
+ MagickArraySize((size_t) i+1,sizeof(ColorPacket)));
if (node_info->list == (ColorPacket *) NULL)
{
ThrowException3(exception,ResourceLimitError,
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
IsPaletteImage(const Image *image,ExceptionInfo *exception);
#if defined(MAGICK_IMPLEMENTATION)
-
-/*
- Macros for testing a pixel to see if it is grayscale, bilevel,
- black, or white
-*/
-#define IsGray(color) \
- (((color).red == (color).green) && ((color).red == (color).blue))
-#define IsMonochrome(color) \
- (((0 == (color).red) || (MaxRGB == (color).red)) && IsGray(color))
-
-#define IsBlackPixel(color) \
- (((color).red == 0U) && IsGray(color))
-
-#define IsWhitePixel(color) \
- (((color).red == MaxRGB) && IsGray(color))
-
-/*
- Compare two colors
-*/
-#define ColorMatch(p,q) \
- (((p)->red == (q)->red) && \
- ((p)->green == (q)->green) && \
- ((p)->blue == (q)->blue))
-
-#define NotColorMatch(p,q) \
- (((p)->red != (q)->red) || \
- ((p)->green != (q)->green) || \
- ((p)->blue != (q)->blue))
-
-extern MagickExport unsigned int
- FuzzyColorMatch(const PixelPacket *p,const PixelPacket *q,const double fuzz) MAGICK_FUNC_PURE;
-
-/*
- Compare two pixels (including opacity)
-*/
-#define PixelMatch(p,q,matte) \
- (ColorMatch(p,q) && \
- (!matte || ((p)->opacity == (q)->opacity)))
-
-#define NotPixelMatch(p,q,matte) \
- (NotColorMatch(p,q) || \
- (matte && ((p)->opacity != (q)->opacity)))
-
-
+# include "magick/color-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Private Color Lookup Methods.
+*/
+
+/*
+ Information about a named color (Internal).
+*/
+typedef struct _ColorInfo
+{
+ char
+ *path,
+ *name;
+
+ ComplianceType
+ compliance;
+
+ PixelPacket
+ color;
+
+ unsigned int
+ stealth;
+
+ unsigned long
+ signature;
+
+ struct _ColorInfo
+ *previous,
+ *next;
+} ColorInfo;
+
+extern const ColorInfo
+ *GetColorInfo(const char *name, ExceptionInfo *exception);
+
+extern ColorInfo
+ **GetColorInfoArray(ExceptionInfo *exception);
+
+extern void
+ DestroyColorInfo(void);
+
+extern unsigned int
+ ListColorInfo(FILE *file,ExceptionInfo *exception);
+
+extern MagickPassFail
+ InitializeColorInfo(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003 - 2009 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
const ComplianceType compliance,char *name,ExceptionInfo *exception);
#if defined(MAGICK_IMPLEMENTATION)
-
-/*
- Information about a named color (Internal).
-*/
-typedef struct _ColorInfo
-{
- char
- *path,
- *name;
-
- ComplianceType
- compliance;
-
- PixelPacket
- color;
-
- unsigned int
- stealth;
-
- unsigned long
- signature;
-
- struct _ColorInfo
- *previous,
- *next;
-} ColorInfo;
-
-extern const ColorInfo
- *GetColorInfo(const char *name, ExceptionInfo *exception);
-
-extern ColorInfo
- **GetColorInfoArray(ExceptionInfo *exception);
-
-extern void
- DestroyColorInfo(void);
-
-extern unsigned int
- ListColorInfo(FILE *file,ExceptionInfo *exception);
-
-extern MagickPassFail
- InitializeColorInfo(void);
-
+# include "magick/color_lookup-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+ Copyright 1991-1999 E. I. du Pont de Nemours and Company
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Colormap Methods
+*/
+
+#define VerifyColormapIndexWithColors(image,index,colors) \
+{ \
+ if (index >= colors) \
+ { \
+ if (image->exception.severity < CorruptImageError ) \
+ { \
+ char \
+ colormapIndexBuffer[MaxTextExtent]; \
+ \
+ FormatString(colormapIndexBuffer, \
+ "index %" MAGICK_SIZE_T_F "u >= %u colors, %.1024s", \
+ (MAGICK_SIZE_T) index, (unsigned int) colors, image->filename); \
+ errno=0; \
+ ThrowException(&image->exception,CorruptImageError, \
+ InvalidColormapIndex,colormapIndexBuffer); \
+ } \
+ index = 0U; \
+ } \
+}
+
+#define VerifyColormapIndex(image,index) \
+{ \
+ VerifyColormapIndexWithColors(image,index,image->colors) \
+}
+
+extern MagickExport unsigned int
+ MagickConstrainColormapIndex(Image *image, unsigned int index) MAGICK_FUNC_DEPRECATED;
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
SortColormapByIntensity(Image *image);
#if defined(MAGICK_IMPLEMENTATION)
-
-#define VerifyColormapIndexWithColors(image,index,colors) \
-{ \
- if (index >= colors) \
- { \
- if (image->exception.severity < CorruptImageError ) \
- { \
- char \
- colormapIndexBuffer[MaxTextExtent]; \
- \
- FormatString(colormapIndexBuffer, \
- "index %" MAGICK_SIZE_T_F "u >= %u colors, %.1024s", \
- (MAGICK_SIZE_T) index, (unsigned int) colors, image->filename); \
- errno=0; \
- ThrowException(&image->exception,CorruptImageError, \
- InvalidColormapIndex,colormapIndexBuffer); \
- } \
- index = 0U; \
- } \
-}
-
-#define VerifyColormapIndex(image,index) \
-{ \
- VerifyColormapIndexWithColors(image,index,image->colors) \
-}
-
-extern MagickExport unsigned int
- MagickConstrainColormapIndex(Image *image, unsigned int index) MAGICK_FUNC_DEPRECATED;
-
+# include "magick/colormap-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Image Command Methods.
+*/
+
+extern void
+ MagickDestroyCommandInfo(void);
+
+extern MagickPassFail
+ MagickInitializeCommandInfo(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
ThrowException(&(*image)->exception,OptionError,MatrixIsNotSquare,message);
continue;
}
- kernel=MagickAllocateArray(double *,order*order,sizeof(double));
+ kernel=MagickAllocateArray(double *,(size_t) order*order,sizeof(double));
if (kernel == (double *) NULL)
MagickFatalError(ResourceLimitFatalError,MemoryAllocationFailed,
MagickMsg(ResourceLimitError,UnableToAllocateCoefficients));
ThrowException(&(*image)->exception,OptionError,MatrixIsNotSquare,message);
continue;
}
- matrix=MagickAllocateArray(double *,order*order,sizeof(double));
+ matrix=MagickAllocateArray(double *,MagickArraySize(order,order),sizeof(double));
if (matrix == (double *) NULL)
MagickFatalError(ResourceLimitFatalError,MemoryAllocationFailed,
MagickMsg(ResourceLimitError,UnableToAllocateCoefficients));
support_text=(support ? "yes" : "no");
if ((text != NULL) && strlen(text) != 0)
- (void) fprintf(stdout," %-24s %s (%s)\n", feature, support_text, text);
+ (void) fprintf(stdout," %-26s %s (%s)\n", feature, support_text, text);
else
- (void) fprintf(stdout," %-24s %s\n", feature, support_text);
+ (void) fprintf(stdout," %-26s %s\n", feature, support_text);
}
static void PrintFeature(const char* feature,MagickBool support)
{
#endif /* defined(HasMTMALLOC) */
PrintFeature("Solaris mtmalloc", supported);
+ /* Google perftools tcmalloc */
+ supported=MagickFalse;
+#if defined(HasTCMALLOC)
+ supported=MagickTrue;
+#endif /* defined(HasTCMALLOC) */
+ PrintFeature("Google perftools tcmalloc", supported);
+
/* OpenMP */
supported=MagickFalse;
text[0]='\0';
/*
- Copyright (C) 2003 - 2017 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
GMCommand(int argc,char **argv);
#if defined(MAGICK_IMPLEMENTATION)
-
-extern void
- MagickDestroyCommandInfo(void);
-
-extern MagickPassFail
- MagickInitializeCommandInfo(void);
-
+# include "magick/command-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
#if !defined(MAGICK_FUNC_WARN_UNUSED_RESULT)
# define MAGICK_FUNC_WARN_UNUSED_RESULT /*nothing*/
#endif
+#if !defined(MAGICK_FUNC_NOINLINE)
+# define MAGICK_FUNC_NOINLINE /*nothing*/
+#endif
+#if !defined(MAGICK_FUNC_ALWAYSINLINE)
+# define MAGICK_FUNC_ALWAYSINLINE /*nothing*/
+#endif
#if !defined(MAGICK_FUNC_ALLOC_SIZE_1ARG)
# define MAGICK_FUNC_ALLOC_SIZE_1ARG(arg_num) /*nothing*/
#endif
#if !defined(MAGICK_FUNC_COLD)
# define MAGICK_FUNC_COLD /*nothing*/
#endif
-#if !defined(MAGICK_ASSUME_ALIGNED)
-# define MAGICK_ASSUME_ALIGNED(exp,align) (exp)
-#endif
-#if !defined(MAGICK_ASSUME_ALIGNED_OFFSET)
-# define MAGICK_ASSUME_ALIGNED_OFFSET(exp,align,offset) (exp)
-#endif
#if !defined(MAGICK_OPTIMIZE_FUNC)
# define MAGICK_OPTIMIZE_FUNC(opt) /*nothing*/
#endif
#if !defined(MAGICK_FALLTHROUGH)
# define MAGICK_FALLTHROUGH /*nothing*/
#endif
+#if !defined(MAGICK_ASSUME_ALIGNED)
+# define MAGICK_ASSUME_ALIGNED(exp,align) (exp)
+#endif
+#if !defined(MAGICK_ASSUME_ALIGNED_OFFSET)
+# define MAGICK_ASSUME_ALIGNED_OFFSET(exp,align,offset) (exp)
+#endif
/*
The isnan and isinf macros are defined by c99 but might not always be
y_displace=(vertical_scale*(p->opacity-
(((double) MaxRGB+1.0)/2)))/(((double) MaxRGB+1.0)/2);
if (InterpolateViewColor(AccessDefaultCacheView(canvas_image),r,
- x_offset+x+x_displace,y_offset+y+y_displace,
+ x_offset+(size_t) x+x_displace,y_offset+(size_t) y+y_displace,
&canvas_image->exception) == MagickFail)
{
status=MagickFail;
image->ascii85->buffer[image->ascii85->offset+1]=0;
image->ascii85->buffer[image->ascii85->offset+2]=0;
tuple=Ascii85Tuple(tuple_buff, image->ascii85->buffer);
- (void) WriteBlob(image,image->ascii85->offset+1,
+ (void) WriteBlob(image,(size_t) image->ascii85->offset+1,
*tuple == 'z' ? "!!!!" : tuple);
}
(void) WriteBlobByte(image,'~');
width=image->columns;
if (is_fax == True)
width=Max(image->columns,1728);
- scanline=MagickAllocateMemory(unsigned char *,width+1);
+ scanline=MagickAllocateMemory(unsigned char *,(size_t) width+1);
if (scanline == (unsigned char *) NULL)
ThrowBinaryException(ResourceLimitError,MemoryAllocationFailed,
(char *) NULL);
if (runlength >= 64)
{
if (runlength < 1792)
- entry=MWTable+((runlength/64)-1);
+ entry=MWTable+(((size_t) runlength/64)-1);
else
entry=EXTable+(Min(runlength,2560)-1792)/64;
runlength-=entry->count;
}
if (runlength >= 64)
{
- entry=MBTable+((runlength/64)-1);
+ entry=MBTable+(((size_t) runlength/64)-1);
if (runlength >= 1792)
entry=EXTable+(Min(runlength,2560)-1792)/64;
runlength-=entry->count;
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Constitute Methods.
+*/
+
+extern MagickExport void
+ DestroyConstitute(void);
+
+extern MagickPassFail
+ InitializeConstitute(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
-% Copyright (C) 2003 - 2017 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
assert(image_info->filename != (char *) NULL);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
- GetTimerInfo(&image->timer);
+ if (LocaleNCompare(image_info->magick,"INFO",sizeof("INFO")-1))
+ GetTimerInfo(&image->timer);
image->logging=IsEventLogging();
clone_info=CloneImageInfo(image_info);
(void) strlcpy(clone_info->filename,image->filename,MaxTextExtent);
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
MagickGetQuantumSamplesPerPixel(const QuantumType quantum_type) MAGICK_FUNC_CONST;
#if defined(MAGICK_IMPLEMENTATION)
-
-extern MagickExport void
- DestroyConstitute(void);
-
-extern MagickPassFail
- InitializeConstitute(void);
-
+# include "magick/constitute-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Methods to Read/Write/Invoke Delegates.
+*/
+#ifndef _MAGICK_DELEGATE_H
+#define _MAGICK_DELEGATE_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*
+ Delegate structure definitions.
+*/
+typedef struct _DelegateInfo
+{
+ char
+ *path, /* Path to delegate configuation file */
+ *decode, /* Decode from format */
+ *encode; /* Transcode to format */
+
+ char
+ *commands; /* Commands to execute */
+
+ int mode; /* <0 = encoder, >0 = decoder */
+
+ MagickBool
+ stealth; /* Don't list this delegate */
+
+ unsigned long
+ signature;
+
+ struct _DelegateInfo
+ *previous,
+ *next;
+} DelegateInfo;
+
+/*
+ Magick delegate methods.
+*/
+extern MagickExport char
+ *GetDelegateCommand(const ImageInfo *image_info,Image *image,
+ const char *decode,const char *encode,
+ ExceptionInfo *exception);
+
+extern MagickExport const DelegateInfo
+ *GetDelegateInfo(const char *decode,const char *encode,
+ ExceptionInfo *exception),
+ *GetPostscriptDelegateInfo(const ImageInfo *image_info,
+ unsigned int *antialias, ExceptionInfo *exception);
+
+extern MagickExport DelegateInfo
+ *SetDelegateInfo(DelegateInfo *);
+
+extern MagickExport MagickPassFail
+ InvokePostscriptDelegate(const unsigned int verbose,const char *command,
+ ExceptionInfo *exception),
+ InvokeDelegate(ImageInfo *image_info,Image *image,const char *decode,
+ const char *encode,ExceptionInfo *exception),
+ ListDelegateInfo(FILE *file,ExceptionInfo *exception);
+
+#if defined(HasGS)
+#include "ghostscript/iapi.h"
+#endif
+
+#ifndef gs_main_instance_DEFINED
+# define gs_main_instance_DEFINED
+typedef struct gs_main_instance_s gs_main_instance;
+#endif
+
+#if !defined(MagickDLLCall)
+# if defined(MSWINDOWS)
+# define MagickDLLCall __stdcall
+# else
+# define MagickDLLCall
+# endif
+#endif
+
+/*
+ Define a vector of Ghostscript library callback functions so that
+ DLL/shared and static Ghostscript libbraries may be handled identically.
+ These definitions must be compatible with those in the Ghostscript API
+ headers (which we don't require).
+
+ http://pages.cs.wisc.edu/~ghost/doc/cvs/API.htm
+ */
+typedef struct _GhostscriptVectors
+{
+ /* Exit the interpreter (gsapi_exit)*/
+ int (MagickDLLCall *exit)(gs_main_instance *instance);
+
+ /* Destroy instance of Ghostscript. Call exit first! (gsapi_delete_instance) */
+ void (MagickDLLCall *delete_instance)(gs_main_instance *instance);
+
+ /* Initialize the Ghostscript interpreter (gsapi_init_with_args) */
+ int (MagickDLLCall *init_with_args)(gs_main_instance *instance,int argc,
+ char **argv);
+
+ /* Create a new instance of the Ghostscript interpreter (gsapi_new_instance) */
+ int (MagickDLLCall *new_instance)(gs_main_instance **pinstance,
+ void *caller_handle);
+
+ /* Execute string command in Ghostscript interpreter (gsapi_run_string) */
+ int (MagickDLLCall *run_string)(gs_main_instance *instance,const char *str,
+ int user_errors,int *pexit_code);
+} GhostscriptVectors;
+
+extern MagickExport void
+ DestroyDelegateInfo(void);
+
+extern MagickPassFail
+ InitializeDelegateInfo(void);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _MAGICK_DELEGATE_H */
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
}
i++;
(void) fprintf(file," %.1024s:\n",tag);
- length=profile[i++] << 8;
- length|=profile[i++];
+ length=(size_t) profile[i++] << 8;
+ length|=(size_t) profile[i++];
length=Min(length,profile_length-i);
text=MagickAllocateMemory(char *,length+1);
if (text != (char *) NULL)
context->index++;
MagickReallocMemory(DrawInfo **,context->graphic_context,
- (context->index+1)*sizeof(DrawInfo *));
+ MagickArraySize((size_t) context->index+1,sizeof(DrawInfo *)));
if (context->graphic_context == (DrawInfo **) NULL)
{
context->index--;
dasharray = (double *)NULL;
if (n != 0)
{
- dasharray = MagickAllocateArray(double *, n+1, sizeof(double));
+ dasharray = MagickAllocateArray(double *, (size_t) n+1, sizeof(double));
if (dasharray != (double*)NULL)
{
p = CurrentContext->dash_pattern;
if( n_new != 0 )
{
CurrentContext->dash_pattern = MagickAllocateArray(double *,
- (n_new+1),
+ ((size_t) n_new+1),
sizeof(double));
if(CurrentContext->dash_pattern)
{
#include "magick/operator.h"
#include "magick/pixel_cache.h"
#include "magick/pixel_iterator.h"
-#include "magick/random-private.h"
#include "magick/random.h"
#include "magick/render.h"
#include "magick/shear.h"
{
aggregate=zero;
p=kernel;
- q=source+(x-width/2);
+ q=source+((size_t) x-width/2);
for (i=0; i < (long) width; i++)
{
aggregate.red+=(*p)*q->red;
aggregate=zero;
scale=0;
p=kernel;
- q=source+(x-width/2);
+ q=source+((size_t) x-width/2);
for (i=0; i < (long) (columns-x+width/2); i++)
{
aggregate.red+=(*p)*q->red;
normal_kernel=MagickAllocateAlignedMemory(float_quantum_t *,
MAGICK_CACHE_LINE_SIZE,
- width*width*sizeof(float_quantum_t));
+ (size_t) width*width*sizeof(float_quantum_t));
if (normal_kernel == (float_quantum_t *) NULL)
{
DestroyImage(convolve_image);
for (u=0; u < width; u++)
pixel.red+=k[u]*r[u].red;
k+= width;
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
q->red=q->green=q->blue=RoundFloatQuantumToIntQuantum(pixel.red);
q->opacity=OpaqueOpacity;
pixel.blue+=k[u]*r[u].blue;
}
k+=width;
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
q->red=RoundFloatQuantumToIntQuantum(pixel.red);
q->green=RoundFloatQuantumToIntQuantum(pixel.green);
pixel.opacity+=k[u]*r[u].opacity;
}
k+=width;
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
q->red=RoundFloatQuantumToIntQuantum(pixel.red);
q->green=RoundFloatQuantumToIntQuantum(pixel.green);
/*
Compute buffer size
*/
- length=(image->columns+2)*(image->rows+2);
+ length=MagickArraySize((size_t) image->columns+2,(size_t) image->rows+2);
/*
Allocate planar working buffers
if (((long) image->columns < width) || ((long) image->rows < width))
ThrowImageException3(OptionError,UnableToEdgeImage,
ImageSmallerThanRadius);
- kernel=MagickAllocateMemory(double *,width*width*sizeof(double));
+ kernel=MagickAllocateArray(double *,MagickArraySize(width,width),sizeof(double));
if (kernel == (double *) NULL)
ThrowImageException3(ResourceLimitError,MemoryAllocationFailed,
UnableToEdgeImage);
for (i=0; i < (width*width); i++)
kernel[i]=(-1.0);
- kernel[i/2]=width*width-1.0;
+ kernel[i/2]=(double) width*width-1.0;
edge_image=ConvolveImage(image,width,kernel,exception);
MagickFreeMemory(kernel);
edge_image->is_grayscale=image->is_grayscale;
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
width=GetOptimalKernelWidth(radius,0.5);
- kernel=MagickAllocateMemory(double *,width*width*sizeof(double));
+ kernel=MagickAllocateArray(double *,MagickArraySize(width,width),sizeof(double));
if (kernel == (double *) NULL)
ThrowImageException3(ResourceLimitError,MemoryAllocationFailed,
UnableToEmbossImage);
{
for (u=(-width/2); u <= (width/2); u++)
{
- alpha=exp(-((double) u*u+v*v)/(2.0*sigma*sigma));
+ alpha=exp(-((double) u*u+(double) v*v)/(2.0*sigma*sigma));
kernel[i]=((u < 0) || (v < 0) ? -8.0 : 8.0)*
alpha/(2.0*MagickPI*sigma*sigma);
if (u == j)
/*
Transfer first 2 pixels of the scanline.
*/
- *q++=(*(p+2*image->columns));
- *q++=(*(p+2*image->columns+1));
+ *q++=(*(p+(size_t) 2*image->columns));
+ *q++=(*(p+(size_t) 2*image->columns+1));
for (x=2; x < (long) (image->columns-2); x++)
{
/*
*/
aggregate=zero;
total_weight=0.0;
- r=p+2*image->columns+2;
+ r=p+(size_t) 2*image->columns+2;
pixel_red=r->red;
pixel_green=r->green;
pixel_blue=r->blue;
for (i=0 ; i < 5; i++)
{
- r=p+i*image->columns;
+ r=p+(size_t) i*image->columns;
for (j = 0; j < 5; j++)
{
const double red = (double) r->red;
if (((long) image->columns < width) || ((long) image->rows < width))
ThrowImageException3(OptionError,UnableToBlurImage,
ImageSmallerThanRadius);
- kernel=MagickAllocateMemory(double *,width*width*sizeof(double));
+ kernel=MagickAllocateArray(double *,MagickArraySize(width,width),sizeof(double));
if (kernel == (double *) NULL)
ThrowImageException(ResourceLimitError,MemoryAllocationFailed,
MagickMsg(OptionError,UnableToBlurImage));
i=0;
- for (v=(-width/2); v <= (width/2); v++)
+ for (v=(-(width)/2); v <= (width/2); v++)
{
for (u=(-width/2); u <= (width/2); u++)
{
- alpha=exp(-((double) u*u+v*v)/(2.0*sigma*sigma));
+ alpha=exp(-((double) u*u+(double) v*v)/(2.0*sigma*sigma));
kernel[i]=alpha/(2.0*MagickPI*sigma*sigma);
i++;
}
{
for (u=0; u < width; u++)
InsertMedianList(skiplist,&r[u]);
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
GetMedianList(skiplist,&q[x]);
}
/*
Allocate and initialize offsets.
*/
- offsets=MagickAllocateMemory(BlurOffsetInfo *,width*sizeof(BlurOffsetInfo));
+ offsets=MagickAllocateArray(BlurOffsetInfo *,width,sizeof(BlurOffsetInfo));
if (offsets == (BlurOffsetInfo *) NULL)
{
MagickFreeMemory(kernel);
y=(long) (width*cos(DegreesToRadians(angle+90)));
for (i=0; i < width; i++)
{
- offsets[i].x=(int) (i*x/sqrt(x*x+y*y)+0.5);
- offsets[i].y=(int) (i*y/sqrt(x*x+y*y)+0.5);
+ offsets[i].x=(int) ((double) i*x/sqrt((double) x*x+(double) y*y)+0.5);
+ offsets[i].y=(int) ((double) i*y/sqrt((double) x*x+(double) y*y)+0.5);
}
}
/*
{
for (u=0; u < width; u++)
InsertMedianList(skiplist,&r[u]);
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
q[x]=GetNonpeakMedianList(skiplist);
p++;
if (((long) image->columns < width) || ((long) image->rows < width))
ThrowImageException3(OptionError,UnableToSharpenImage,
ImageSmallerThanRadius);
- kernel=MagickAllocateMemory(double *,width*width*sizeof(double));
+ kernel=MagickAllocateArray(double *,MagickArraySize(width,width),sizeof(double));
if (kernel == (double *) NULL)
ThrowImageException3(ResourceLimitError,MemoryAllocationFailed,
UnableToSharpenImage);
{
for (u=(-width/2); u <= (width/2); u++)
{
- alpha=exp(-((double) u*u+v*v)/(2.0*sigma*sigma));
+ alpha=exp(-((double) u*u+(double) v*v)/(2.0*sigma*sigma));
kernel[i]=alpha/(2.0*MagickPI*sigma*sigma);
normalize+=kernel[i];
i++;
}
} while (((y+y_distance) < 0) ||
((y+y_distance) >= (long) image->rows));
- *q=*(neighbors+(x+x_distance)+((y+y_distance-y_min)*image->columns));
+ *q=*(neighbors+(((size_t) x)+x_distance)+((((size_t) y)+y_distance-y_min)*(size_t) image->columns));
q++;
}
if (!SyncImagePixelsEx(spread_image,exception))
(void) ModulateImagePixels(NULL,¶m,image,image->colormap,
(IndexPacket *) NULL,image->colors,
&image->exception);
- status=MagickMonitorFormatted(image->colors,image->colors+1,&image->exception,
+ status=MagickMonitorFormatted(image->colors,(size_t) image->colors+1,&image->exception,
progress_message,image->filename);
status&=SyncImage(image);
}
/*
GravityType
*/
+MagickExport const char *GravityTypeToString(const GravityType gravity_type)
+{
+ const char
+ *gravity="?";
+
+ switch(gravity_type)
+ {
+ case ForgetGravity:
+ gravity="Forget";
+ break;
+ case NorthWestGravity:
+ gravity="NorthWest";
+ break;
+ case NorthGravity:
+ gravity="North";
+ break;
+ case NorthEastGravity:
+ gravity="NorthEast";
+ break;
+ case WestGravity:
+ gravity="West";
+ break;
+ case CenterGravity:
+ gravity="Center";
+ break;
+ case EastGravity:
+ gravity="East";
+ break;
+ case SouthWestGravity:
+ gravity="SouthWest";
+ break;
+ case SouthGravity:
+ gravity="South";
+ break;
+ case SouthEastGravity:
+ gravity="SouthEast";
+ break;
+ case StaticGravity:
+ gravity="Static";
+ break;
+ }
+
+ return gravity;
+}
MagickExport GravityType StringToGravityType(const char *option)
{
GravityType
extern MagickExport const char *CompositeOperatorToString(const CompositeOperator composite_op) MAGICK_FUNC_CONST;
extern MagickExport const char *CompressionTypeToString(const CompressionType compression_type) MAGICK_FUNC_CONST;
extern MagickExport const char *ConfirmAccessModeToString(const ConfirmAccessMode access_mode) MAGICK_FUNC_CONST;
+ extern MagickExport const char *GravityTypeToString(const GravityType gravity_type) MAGICK_FUNC_CONST;
extern MagickExport const char *EndianTypeToString(const EndianType endian_type) MAGICK_FUNC_CONST;
extern MagickExport const char *HighlightStyleToString(const HighlightStyle difference_algorithm) MAGICK_FUNC_CONST;
extern MagickExport const char *ImageTypeToString(const ImageType image_type) MAGICK_FUNC_CONST;
--- /dev/null
+/*
+ Copyright (C) 2003-2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+ Copyright 1991-1999 E. I. du Pont de Nemours and Company
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagickMagick Exception Methods.
+*/
+
+extern MagickPassFail
+ InitializeMagickExceptionHandling(void);
+
+extern void
+ DestroyMagickExceptionHandling(void);
+
+#if !defined(MAGICK_FUNC_NORETURN)
+# define MAGICK_NORETURN_EXIT exit(1)
+#else
+# define MAGICK_NORETURN_EXIT
+#endif
+
+# if defined(MAGICK_IDBASED_MESSAGES)
+
+# define MagickMsg(severity_,msg_) GetLocaleMessageFromID(MGK_##severity_##msg_)
+
+/* Severity ID translated. */
+# define ThrowException(exception_,severity_,reason_,description_) \
+ (ThrowLoggedException(exception_,severity_,GetLocaleMessageFromID(\
+ MGK_##severity_##reason_),description_,GetMagickModule()))
+
+/* No IDs translated */
+# define ThrowException2(exception_,severity_,reason_,description_) \
+ (ThrowLoggedException(exception_,severity_,reason_,description_,\
+ GetMagickModule()))
+
+/* Severity and description IDs translated */
+# define ThrowException3(exception_,severity_,reason_,description_) \
+ (ThrowLoggedException(exception_,severity_,GetLocaleMessageFromID(\
+ MGK_##severity_##reason_),GetLocaleMessageFromID(\
+ MGK_##severity_##description_),GetMagickModule()))
+
+# define MagickError(severity_,reason_,description_) \
+ (_MagickError(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
+ description_))
+
+# define MagickFatalError(severity_,reason_,description_) \
+ (_MagickFatalError(severity_,GetLocaleMessageFromID(\
+ MGK_##severity_##reason_),description_));MAGICK_NORETURN_EXIT
+
+# define MagickWarning(severity_,reason_,description_) \
+ (_MagickWarning(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
+ description_))
+
+# define MagickError2(severity_,reason_,description_) \
+ (_MagickError(severity_,reason_,description_))
+
+# define MagickFatalError2(severity_,reason_,description_) \
+ (_MagickFatalError(severity_,reason_,description_));MAGICK_NORETURN_EXIT
+
+# define MagickWarning2(severity_,reason_,description_) \
+ (_MagickWarning(severity_,reason_,description_))
+
+# define MagickError3(severity_,reason_,description_) \
+ (_MagickError(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
+ GetLocaleMessageFromID(MGK_##severity_##description_)))
+
+# define MagickFatalError3(severity_,reason_,description_) \
+ (_MagickFatalError(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
+ GetLocaleMessageFromID(MGK_##severity_##description_)));MAGICK_NORETURN_EXIT
+
+# define MagickWarning3(severity_,reason_,description_) \
+ (_MagickWarning(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
+ GetLocaleMessageFromID(MGK_##severity_##description_)))
+/* end #if defined(MAGICK_IDBASED_MESSAGES) */
+# else
+
+# define MagickMsg(severity_,msg_) GetLocaleExceptionMessage(severity_,#msg_)
+
+# define ThrowException(exception_,severity_,reason_,description_) \
+ (ThrowLoggedException(exception_,severity_,#reason_,description_,GetMagickModule()))
+
+# define ThrowException2(exception_,severity_,reason_,description_) \
+ (ThrowLoggedException(exception_,severity_,reason_,description_,GetMagickModule()))
+
+# define ThrowException3(exception_,severity_,reason_,description_) \
+ (ThrowLoggedException(exception_,severity_,#reason_,#description_,GetMagickModule()))
+
+# define MagickError(severity_,reason_,description_) \
+ (_MagickError(severity_,#reason_,description_))
+
+# define MagickFatalError(severity_,reason_,description_) \
+ (_MagickFatalError(severity_,#reason_,description_));MAGICK_NORETURN_EXIT
+
+# define MagickWarning(severity_,reason_,description_) \
+ (_MagickWarning(severity_,#reason_,description_))
+
+# define MagickError2(severity_,reason_,description_) \
+ (_MagickError(severity_,reason_,description_))
+
+# define MagickFatalError2(severity_,reason_,description_) \
+ (_MagickFatalError(severity_,reason_,description_));MAGICK_NORETURN_EXIT
+
+# define MagickWarning2(severity_,reason_,description_) \
+ (_MagickWarning(severity_,reason_,description_))
+
+# define MagickError3(severity_,reason_,description_) \
+ (_MagickError(severity_,#reason_,#description_))
+
+# define MagickFatalError3(severity_,reason_,description_) \
+ (_MagickFatalError(severity_,#reason_,#description_));MAGICK_NORETURN_EXIT
+
+# define MagickWarning3(severity_,reason_,description_) \
+ (_MagickWarning(severity_,#reason_,#description_))
+
+# endif
+
+#define ThrowBinaryException(severity_,reason_,description_) \
+do { \
+ if (image != (Image *) NULL) \
+ { \
+ ThrowException(&image->exception,severity_,reason_,description_); \
+ } \
+ return(MagickFail); \
+} while (0);
+
+#define ThrowBinaryException2(severity_,reason_,description_) \
+do { \
+ if (image != (Image *) NULL) \
+ { \
+ ThrowException2(&image->exception,severity_,reason_,description_); \
+ } \
+ return(MagickFail); \
+} while (0);
+
+#define ThrowBinaryException3(severity_,reason_,description_) \
+do { \
+ if (image != (Image *) NULL) \
+ { \
+ ThrowException3(&image->exception,severity_,reason_,description_); \
+ } \
+ return(MagickFail); \
+} while (0);
+
+#define ThrowImageException(code_,reason_,description_) \
+do { \
+ ThrowException(exception,code_,reason_,description_); \
+ return((Image *) NULL); \
+} while (0);
+
+#define ThrowImageException2(code_,reason_,description_) \
+do { \
+ ThrowException2(exception,code_,reason_,description_); \
+ return((Image *) NULL); \
+} while (0);
+
+#define ThrowImageException3(code_,reason_,description_) \
+do { \
+ ThrowException3(exception,code_,reason_,description_); \
+ return((Image *) NULL); \
+} while (0);
+
+#define ThrowReaderException(code_,reason_,image_) \
+do { \
+ if (code_ > exception->severity) \
+ { \
+ ThrowException(exception,code_,reason_,image_ ? (image_)->filename : 0); \
+ } \
+ if (image_) \
+ { \
+ CloseBlob(image_); \
+ DestroyImageList(image_); \
+ } \
+ return((Image *) NULL); \
+} while (0);
+
+#define ThrowWriterException(code_,reason_,image_) \
+do { \
+ assert(image_ != (Image *) NULL); \
+ ThrowException(&(image_)->exception,code_,reason_,(image_)->filename); \
+ if (image_info->adjoin) \
+ while ((image_)->previous != (Image *) NULL) \
+ (image_)=(image_)->previous; \
+ CloseBlob(image_); \
+ return(MagickFail); \
+} while (0);
+
+#define ThrowWriterException2(code_,reason_,image_) \
+do { \
+ assert(image_ != (Image *) NULL); \
+ ThrowException2(&(image_)->exception,code_,reason_,(image_)->filename); \
+ if (image_info->adjoin) \
+ while ((image_)->previous != (Image *) NULL) \
+ (image_)=(image_)->previous; \
+ CloseBlob(image_); \
+ return(MagickFail); \
+} while (0);
+
+#define ThrowWriterException3(code_,reason_,image_) \
+do { \
+ assert(image_ != (Image *) NULL); \
+ ThrowException3(&(image_)->exception,code_,reason_,(image_)->filename); \
+ if (image_info->adjoin) \
+ while ((image_)->previous != (Image *) NULL) \
+ (image_)=(image_)->previous; \
+ CloseBlob(image_); \
+ return(MagickFail); \
+} while (0);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003, 2004 GraphicsMagick Group
+ Copyright (C) 2003-2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
Copyright 1991-1999 E. I. du Pont de Nemours and Company
Copyright.txt. You should have received a copy of Copyright.txt with this
package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
- ImageMagick Exception Methods.
+ GraphicsMagick Exception Methods.
*/
#ifndef _MAGICK_ERROR_H
#define _MAGICK_ERROR_H
(*ErrorHandler)(const ExceptionType,const char *,const char *);
typedef void
- (*FatalErrorHandler)(const ExceptionType,const char *,const char *);
+ (*FatalErrorHandler)(const ExceptionType,const char *,const char *) MAGICK_FUNC_NORETURN;
typedef void
(*WarningHandler)(const ExceptionType,const char *,const char *);
#if defined(MAGICK_IMPLEMENTATION)
-extern MagickPassFail
- InitializeMagickExceptionHandling(void);
-
-extern void
- DestroyMagickExceptionHandling(void);
-
-# if defined(MAGICK_IDBASED_MESSAGES)
-
-# define MagickMsg(severity_,msg_) GetLocaleMessageFromID(MGK_##severity_##msg_)
-
-/* Severity ID translated. */
-# define ThrowException(exception_,severity_,reason_,description_) \
- (ThrowLoggedException(exception_,severity_,GetLocaleMessageFromID(\
- MGK_##severity_##reason_),description_,GetMagickModule()))
-
-/* No IDs translated */
-# define ThrowException2(exception_,severity_,reason_,description_) \
- (ThrowLoggedException(exception_,severity_,reason_,description_,\
- GetMagickModule()))
-
-/* Severity and description IDs translated */
-# define ThrowException3(exception_,severity_,reason_,description_) \
- (ThrowLoggedException(exception_,severity_,GetLocaleMessageFromID(\
- MGK_##severity_##reason_),GetLocaleMessageFromID(\
- MGK_##severity_##description_),GetMagickModule()))
-
-# define MagickError(severity_,reason_,description_) \
- (_MagickError(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
- description_))
-
-# define MagickFatalError(severity_,reason_,description_) \
- (_MagickFatalError(severity_,GetLocaleMessageFromID(\
- MGK_##severity_##reason_),description_))
-
-# define MagickWarning(severity_,reason_,description_) \
- (_MagickWarning(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
- description_))
-
-# define MagickError2(severity_,reason_,description_) \
- (_MagickError(severity_,reason_,description_))
-
-# define MagickFatalError2(severity_,reason_,description_) \
- (_MagickFatalError(severity_,reason_,description_))
-
-# define MagickWarning2(severity_,reason_,description_) \
- (_MagickWarning(severity_,reason_,description_))
-
-# define MagickError3(severity_,reason_,description_) \
- (_MagickError(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
- GetLocaleMessageFromID(MGK_##severity_##description_)))
-
-# define MagickFatalError3(severity_,reason_,description_) \
- (_MagickFatalError(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
- GetLocaleMessageFromID(MGK_##severity_##description_)))
-
-# define MagickWarning3(severity_,reason_,description_) \
- (_MagickWarning(severity_,GetLocaleMessageFromID(MGK_##severity_##reason_),\
- GetLocaleMessageFromID(MGK_##severity_##description_)))
-/* end #if defined(MAGICK_IDBASED_MESSAGES) */
-# else
-
-# define MagickMsg(severity_,msg_) GetLocaleExceptionMessage(severity_,#msg_)
-
-# define ThrowException(exception_,severity_,reason_,description_) \
- (ThrowLoggedException(exception_,severity_,#reason_,description_,GetMagickModule()))
-
-# define ThrowException2(exception_,severity_,reason_,description_) \
- (ThrowLoggedException(exception_,severity_,reason_,description_,GetMagickModule()))
-
-# define ThrowException3(exception_,severity_,reason_,description_) \
- (ThrowLoggedException(exception_,severity_,#reason_,#description_,GetMagickModule()))
-
-# define MagickError(severity_,reason_,description_) \
- (_MagickError(severity_,#reason_,description_))
-
-# define MagickFatalError(severity_,reason_,description_) \
- (_MagickFatalError(severity_,#reason_,description_))
-
-# define MagickWarning(severity_,reason_,description_) \
- (_MagickWarning(severity_,#reason_,description_))
-
-# define MagickError2(severity_,reason_,description_) \
- (_MagickError(severity_,reason_,description_))
-
-# define MagickFatalError2(severity_,reason_,description_) \
- (_MagickFatalError(severity_,reason_,description_))
-
-# define MagickWarning2(severity_,reason_,description_) \
- (_MagickWarning(severity_,reason_,description_))
-
-# define MagickError3(severity_,reason_,description_) \
- (_MagickError(severity_,#reason_,#description_))
-
-# define MagickFatalError3(severity_,reason_,description_) \
- (_MagickFatalError(severity_,#reason_,#description_))
-
-# define MagickWarning3(severity_,reason_,description_) \
- (_MagickWarning(severity_,#reason_,#description_))
-
-# endif
-
-#define ThrowBinaryException(severity_,reason_,description_) \
-do { \
- if (image != (Image *) NULL) \
- { \
- ThrowException(&image->exception,severity_,reason_,description_); \
- } \
- return(MagickFail); \
-} while (0);
-
-#define ThrowBinaryException2(severity_,reason_,description_) \
-do { \
- if (image != (Image *) NULL) \
- { \
- ThrowException2(&image->exception,severity_,reason_,description_); \
- } \
- return(MagickFail); \
-} while (0);
-
-#define ThrowBinaryException3(severity_,reason_,description_) \
-do { \
- if (image != (Image *) NULL) \
- { \
- ThrowException3(&image->exception,severity_,reason_,description_); \
- } \
- return(MagickFail); \
-} while (0);
-
-#define ThrowImageException(code_,reason_,description_) \
-do { \
- ThrowException(exception,code_,reason_,description_); \
- return((Image *) NULL); \
-} while (0);
-
-#define ThrowImageException2(code_,reason_,description_) \
-do { \
- ThrowException2(exception,code_,reason_,description_); \
- return((Image *) NULL); \
-} while (0);
-
-#define ThrowImageException3(code_,reason_,description_) \
-do { \
- ThrowException3(exception,code_,reason_,description_); \
- return((Image *) NULL); \
-} while (0);
-
-#define ThrowReaderException(code_,reason_,image_) \
-do { \
- if (code_ > exception->severity) \
- { \
- ThrowException(exception,code_,reason_,image_ ? (image_)->filename : 0); \
- } \
- if (image_) \
- { \
- CloseBlob(image_); \
- DestroyImageList(image_); \
- } \
- return((Image *) NULL); \
-} while (0);
-
-#define ThrowWriterException(code_,reason_,image_) \
-do { \
- assert(image_ != (Image *) NULL); \
- ThrowException(&(image_)->exception,code_,reason_,(image_)->filename); \
- if (image_info->adjoin) \
- while ((image_)->previous != (Image *) NULL) \
- (image_)=(image_)->previous; \
- CloseBlob(image_); \
- return(MagickFail); \
-} while (0);
-
-#define ThrowWriterException2(code_,reason_,image_) \
-do { \
- assert(image_ != (Image *) NULL); \
- ThrowException2(&(image_)->exception,code_,reason_,(image_)->filename); \
- if (image_info->adjoin) \
- while ((image_)->previous != (Image *) NULL) \
- (image_)=(image_)->previous; \
- CloseBlob(image_); \
- return(MagickFail); \
-} while (0);
-
-#define ThrowWriterException3(code_,reason_,image_) \
-do { \
- assert(image_ != (Image *) NULL); \
- ThrowException3(&(image_)->exception,code_,reason_,(image_)->filename); \
- if (image_info->adjoin) \
- while ((image_)->previous != (Image *) NULL) \
- (image_)=(image_)->previous; \
- CloseBlob(image_); \
- return(MagickFail); \
-} while (0);
+# include "magick/error-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
}
ru++;
}
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
*q++=(*s);
}
*/
#include "magick/studio.h"
#include "magick/gem.h"
-#include "magick/random-private.h"
+#include "magick/random.h"
#include "magick/utility.h"
\f
/*
{
for (u=(-width/2); u <= (width/2); u++)
{
- alpha=exp(-((double) u*u+v*v)/(2.0*sigma*sigma));
+ alpha=exp(-((double) u*u+(double) v*v)/(2.0*sigma*sigma));
normalize+=alpha/(2.0*MagickPI*sigma*sigma);
}
}
assert(f != (Quantum *) NULL);
assert(g != (Quantum *) NULL);
- p=f+(columns+2);
- q=g+(columns+2);
- r=p+(y_offset*((long) columns+2)+x_offset);
+ p=f+((size_t) columns+2);
+ q=g+((size_t) columns+2);
+ r=p+(y_offset*((size_t) columns+2)+x_offset);
#if defined(HAVE_OPENMP)
# if defined(TUNE_OPENMP)
# pragma omp parallel for schedule(runtime)
}
}
}
- p=f+(columns+2);
- q=g+(columns+2);
- r=q+(y_offset*((long) columns+2)+x_offset);
- s=q-(y_offset*((long) columns+2)+x_offset);
+ p=f+((size_t) columns+2);
+ q=g+((size_t) columns+2);
+ r=q+(y_offset*((size_t) columns+2)+x_offset);
+ s=q-(y_offset*((size_t) columns+2)+x_offset);
#if defined(HAVE_OPENMP)
# if defined(TUNE_OPENMP)
# pragma omp parallel for schedule(runtime)
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2003 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
#include "magick/studio.h"
#include "magick/alpha_composite.h"
#include "magick/color.h"
+#include "magick/colormap.h"
#include "magick/gradient.h"
+#include "magick/log.h"
#include "magick/monitor.h"
#include "magick/pixel_cache.h"
\f
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GradientImage() applies a continuously smooth color transitions along a
-% vector from one color to another.
+% GradientImage() applies continuously smooth color transitions along a
+% distance vector from one color to another.
+%
+% The default is to apply a gradient from the top of the image to the bottom.
+% Since GraphicsMagick 1.3.35, this function responds to the image gravity
+% attribute as follows:
+%
+% SouthGravity - Top to Bottom (Default)
+% NorthGravity - Bottom to Top
+% WestGravity - Right to Left
+% EastGravity - Left to Right
+% NorthWestGravity - Bottom-Right to Top-Left
+% NorthEastGravity - Bottom-Left to Top-Right
+% SouthWestGravity - Top-Right Bottom-Left
+% SouthEastGravity - Top-Left to Bottom-Right
+%
+% Also, since GraphicsMagick 1.3.35, an effort is made to produce a
+% PseudoClass image representation by default. If the gradient distance
+% vector produces a number of points less than or equal to the maximum
+% colormap size (MaxColormapSize), then a colormap is produced according
+% to the order indicated by the start and stop colors. Otherwise a
+% DirectClass image is created (as it always was prior to 1.3.35). The
+% PseudoClass representation is suitably initialized so that changing
+% the image storage class will lead to an immediately usable DirectClass
+% image.
%
% Note, the interface of this method will change in the future to support
% more than one transistion.
const PixelPacket *start_color,
const PixelPacket *stop_color)
{
- const unsigned long
- image_rows=image->rows,
- image_columns=image->columns;
+ PixelPacket
+ *pixel_packets;
+
+ double
+ alpha_scale,
+ x_origin = 0.0,
+ y_origin = 0.0;
+
+ size_t
+ span;
+
+ unsigned long
+ i;
long
y;
unsigned long
row_count=0;
+#if defined(HAVE_OPENMP)
+ int num_threads = omp_get_max_threads();
+#endif
+
MagickBool
monitor_active;
MagickPassFail
status=MagickPass;
- /*
- Determine (Hue, Saturation, Brightness) gradient.
- */
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
assert(start_color != (const PixelPacket *) NULL);
monitor_active=MagickMonitorActive();
/*
- Generate gradient pixels.
+ -define gradient:direction={NorthWest, North, Northeast, West, East, SouthWest, South, SouthEast}
+
+ South is the default
+
+ image->gravity
+ */
+
+ /*
+ Computed required gradient span
+ */
+ switch(image->gravity)
+ {
+ case SouthGravity:
+ case NorthGravity:
+ default:
+ span = image->rows;
+ break;
+ case WestGravity:
+ case EastGravity:
+ span = image->columns;
+ break;
+ case NorthWestGravity:
+ case NorthEastGravity:
+ case SouthWestGravity:
+ case SouthEastGravity:
+ span = (size_t) (sqrt(((double)image->columns-1)*((double)image->columns-1)+
+ ((double)image->rows-1)*((double)image->rows-1))+0.5)+1;
+ break;
+ }
+
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Gradient span %"MAGICK_SIZE_T_F"u", (MAGICK_SIZE_T) span);
+
+ /*
+ Determine origin pixel for diagonal gradients
+ */
+ switch(image->gravity)
+ {
+ default:
+ break;
+ case NorthWestGravity:
+ /* Origin bottom-right */
+ x_origin = (double)image->columns-1;
+ y_origin = (double)image->rows-1;
+ break;
+ case NorthEastGravity:
+ /* Origin bottom-left */
+ x_origin = 0.0;
+ y_origin = (double)image->rows-1;
+ break;
+ case SouthWestGravity:
+ /* Origin top-right */
+ x_origin = (double)image->columns-1;
+ y_origin = 0.0;
+ break;
+ case SouthEastGravity:
+ /* Origin top-left */
+ x_origin = 0.0;
+ y_origin = 0.0;
+ break;
+ }
+
+ pixel_packets=MagickAllocateArray(PixelPacket *,span,sizeof(PixelPacket));
+ if (pixel_packets == (PixelPacket *) NULL)
+ ThrowBinaryException(ResourceLimitError,MemoryAllocationFailed,
+ image->filename);
+ if (span <= MaxColormapSize)
+ AllocateImageColormap(image,(unsigned long) span);
+
+ /*
+ Generate gradient pixels using alpha blending
+ OpenMP is not demonstrated to help here.
+ */
+ alpha_scale = span > 1 ? ((MaxRGBDouble)/(span-1)) : MaxRGBDouble/2.0;
+
+ for (i=0; i < span; i++)
+ {
+ double alpha = (double)i*alpha_scale;
+ BlendCompositePixel(&pixel_packets[i],start_color,stop_color,alpha);
+#if 0
+ fprintf(stdout, "%lu: %g (r=%u, g=%u, b=%u)\n", i, alpha,
+ (unsigned) pixel_packets[i].red,
+ (unsigned) pixel_packets[i].green,
+ (unsigned) pixel_packets[i].blue);
+#endif
+ }
+
+ if (image->storage_class == PseudoClass)
+ (void) memcpy(image->colormap,pixel_packets,span*sizeof(PixelPacket));
+
+ /*
+ Copy gradient pixels to image rows
*/
#if defined(HAVE_OPENMP)
-# pragma omp parallel for shared(row_count, status)
+ if (num_threads > 3)
+ num_threads = 3;
+# if defined(TUNE_OPENMP)
+# pragma omp parallel for if(num_threads > 1) num_threads(num_threads) schedule(runtime) shared(row_count, status)
+# else
+# pragma omp parallel for if(num_threads > 1) num_threads(num_threads) schedule(guided) shared(row_count, status)
+# endif
#endif
for (y=0; y < (long) image->rows; y++)
{
MagickPassFail
thread_status;
- register long
+ register unsigned long
x;
register PixelPacket
*q;
+ register IndexPacket
+ *indexes = (IndexPacket *) NULL;
+
thread_status=status;
if (thread_status == MagickFail)
continue;
- q=SetImagePixelsEx(image,0,y,image->columns,1,&image->exception);
- if (q == (PixelPacket *) NULL)
- thread_status=MagickFail;
-
- if (q != (PixelPacket *) NULL)
+ do
{
- for (x=0; x < (long) image->columns; x++)
+ q=SetImagePixelsEx(image,0,y,image->columns,1,&image->exception);
+ if (q == (PixelPacket *) NULL)
+ {
+ thread_status=MagickFail;
+ break;
+ }
+ if (image->storage_class == PseudoClass)
{
- BlendCompositePixel(&q[x],start_color,stop_color,(double)
- MaxRGB*(y*image_columns+x)/(image_columns*image_rows));
+ indexes=AccessMutableIndexes(image);
+ if (indexes == (IndexPacket *) NULL)
+ {
+ thread_status=MagickFail;
+ break;
+ }
+ }
+
+ switch(image->gravity)
+ {
+ case SouthGravity:
+ default:
+ {
+ for (x=0; x < image->columns; x++)
+ q[x] = pixel_packets[y];
+ if (indexes)
+ for (x=0; x < image->columns; x++)
+ indexes[x]=(IndexPacket) y;
+ break;
+ }
+ case NorthGravity:
+ {
+ for (x=0; x < image->columns; x++)
+ q[x] = pixel_packets[image->columns-y];
+ if (indexes)
+ for (x=0; x < image->columns; x++)
+ indexes[x]=(IndexPacket) image->columns-y;
+ break;
+ }
+ case WestGravity:
+ {
+ for (x=0; x < image->columns; x++)
+ q[x] = pixel_packets[image->columns-x];
+ if (indexes)
+ for (x=0; x < image->columns; x++)
+ indexes[x]=(IndexPacket) image->columns-x;
+ break;
+ }
+ case EastGravity:
+ {
+ for (x=0; x < image->columns; x++)
+ q[x] = pixel_packets[x];
+ if (indexes)
+ for (x=0; x < image->columns; x++)
+ indexes[x]=(IndexPacket) x;
+ break;
+ }
+ case NorthWestGravity:
+ case NorthEastGravity:
+ case SouthWestGravity:
+ case SouthEastGravity:
+ {
+ /*
+ FIXME: Diagonal gradient should be based on distance
+ from perpendicular line!
+ */
+ double ydf = (y_origin-(double)y)*(y_origin-(double)y);
+ for (x=0; x < image->columns; x++)
+ {
+ i = (unsigned long) (sqrt((x_origin-x)*(x_origin-x)+ydf)+0.5);
+ /* fprintf(stderr,"NW %lux%ld: %lu\n", x, y, (unsigned long) i); */
+ q[x] = pixel_packets[i];
+ if (indexes)
+ indexes[x]=(IndexPacket) i;
+ }
+
+ break;
+ }
}
if (!SyncImagePixelsEx(image,&image->exception))
- thread_status=MagickFail;
- }
+ {
+ thread_status=MagickFail;
+ break;
+ }
- if (monitor_active)
- {
- unsigned long
- thread_row_count;
+ if (monitor_active)
+ {
+ unsigned long
+ thread_row_count;
#if defined(HAVE_OPENMP)
# pragma omp atomic
#endif
- row_count++;
+ row_count++;
#if defined(HAVE_OPENMP)
# pragma omp flush (row_count)
#endif
- thread_row_count=row_count;
- if (QuantumTick(thread_row_count,image->rows))
- if (!MagickMonitorFormatted(thread_row_count,image->rows,&image->exception,
- GradientImageText,image->filename))
- thread_status=MagickFail;
- }
+ thread_row_count=row_count;
+ if (QuantumTick(thread_row_count,image->rows))
+ if (!MagickMonitorFormatted(thread_row_count,image->rows,&image->exception,
+ GradientImageText,image->filename))
+ {
+ thread_status=MagickFail;
+ break;
+ }
+ }
+ } while(0);
if (thread_status == MagickFail)
{
image->is_grayscale=MagickTrue;
if (IsMonochrome(*start_color) && ColorMatch(start_color,stop_color))
image->is_monochrome=MagickTrue;
+ MagickFreeMemory(pixel_packets);
return(status);
}
/*
- Copyright (C) 2018 - 2019 GraphicsMagick Group
+ Copyright (C) 2018 - 2020 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
#define ImageGetClipMaskInlined(i) (&i->extra->clip_mask)
#define ImageGetCompositeMaskInlined(i) (&i->extra->composite_mask)
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
#include "magick/utility.h"
#include "magick/xwindow.h"
\f
-/*
- Constant declaration.
-*/
-const char
- *BackgroundColor = "#ffffffffffff", /* white */
- *BorderColor = "#dfdfdfdfdfdf", /* gray */
- *DefaultTileFrame = "15x15+3+3",
- *DefaultTileGeometry = "120x120+4+3>",
- *DefaultTileLabel = "%f\n%wx%h\n%b",
- *ForegroundColor = "#000000000000", /* black */
- *HighlightColor = "#f1f100001e1e", /* light red */
- *MatteColor = "#bdbdbdbdbdbd", /* gray */
- *PSDensityGeometry = "72.0x72.0",
- *PSPageGeometry = "612x792>";
-
-const unsigned long
- DefaultCompressionQuality = 75;
-
static MagickPassFail
MagickParseSubImageSpecification(const char *subimage_spec,
unsigned long *subimage_ptr,
unsigned long *subrange_ptr,
MagickBool allow_geometry);
-\f
+
/* provide public access to the clip_mask member of Image */
MagickExport Image **
ImageGetClipMask(const Image * image)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DisplayImages() displays an image sequence to any X window screen. It
-% returns a value other than 0 if successful. Check the exception member
-% of image to determine the reason for any failure.
+% returns MagickPass if successful or MagickFail if not. Check the
+% exception member of image to determine the reason for any failure.
%
% The format of the DisplayImages method is:
%
-% unsigned int DisplayImages(const ImageInfo *image_info,Image *image)
+% MagickPassFail DisplayImages(const ImageInfo *image_info,Image *image)
%
% A description of each parameter follows:
%
MagickXDestroyResourceInfo(&resource_info);
MagickXDestroyX11Resources();
(void) XCloseDisplay(display);
- return(image->exception.severity != UndefinedException);
+ return(image->exception.severity == UndefinedException ? MagickPass : MagickFail);
}
#else
MagickExport unsigned int DisplayImages(const ImageInfo *image_info,
if (images == (Image *) NULL)
return((Image **) NULL);
assert(images->signature == MagickSignature);
- group=MagickAllocateMemory(Image **,(GetImageListLength(images)+1)*sizeof(Image *));
+ group=MagickAllocateArray(Image **,((size_t) GetImageListLength(images)+1),sizeof(Image *));
if (group == (Image **) NULL)
{
ThrowException3(exception,ResourceLimitError,MemoryAllocationFailed,
"Unsupported bits per sample\0"
"Unsupported cell type in the matrix\0"
"Unsupported number of columns\0"
- "Unsupported number of columns\0"
+ "Unsupported number of rows\0"
"Unsupported samples per pixel\0"
"WebP decoding failed: user abort\0"
"WebP encoding failed: unknown reason\0"
2709,
2745,
2775,
- 2805,
- 2835,
- 2868,
- 2905,
- 2941,
- 2973,
- 3019,
- 3062,
- 3106,
- 3143,
- 3179,
- 3231,
- 3280,
- 3313,
- 3360,
- 3391,
- 3424,
- 3438,
- 3472,
- 3506,
- 3585,
- 3622,
- 3658,
- 3685,
- 3725,
- 3754,
- 3768,
- 3806,
- 3846,
- 3890,
- 3906,
- 3946,
- 3984,
- 4015,
- 4037,
- 4051,
- 4102,
- 4127,
- 4152,
- 4174,
- 4206,
- 4229,
- 4257,
- 4290,
- 4323,
- 4351,
- 4388,
- 4420,
- 4455,
- 4520,
- 4548,
- 4587,
- 4616,
- 4647,
- 4678,
- 4704,
- 4732,
- 4760,
- 4797,
- 4827,
- 4852,
- 4894,
- 4927,
- 4954,
- 4977,
- 5004,
- 5025,
- 5053,
- 5078,
- 5108,
- 5132,
- 5160,
- 5189,
- 5211,
- 5233,
- 5268,
- 5290,
- 5313,
- 5346,
- 5374,
- 5400,
- 5441,
- 5478,
- 5511,
- 5539,
- 5570,
- 5586,
- 5620,
- 5664,
- 5694,
- 5739,
- 5761,
- 5781,
- 5794,
- 5821,
- 5844,
- 5877,
- 5905,
- 5933,
- 5966,
- 5999,
- 6027,
- 6054,
- 6112,
- 6126,
- 6142,
- 6177,
- 6197,
- 6224,
- 6261,
- 6300,
- 6327,
- 6371,
- 6401,
- 6422,
- 6446,
- 6462,
- 6498,
- 6531,
- 6553,
- 6567,
- 6586,
- 6627,
- 6641,
- 6673,
- 6693,
- 6714,
- 6728,
- 6744,
- 6767,
- 6812,
- 6846,
- 6871,
- 6897,
- 6933,
- 6967,
- 6992,
- 7014,
- 7041,
- 7060,
- 7083,
- 7117,
- 7138,
- 7160,
- 7188,
- 7205,
- 7228,
- 7253,
- 7277,
- 7302,
- 7327,
- 7357,
- 7387,
- 7424,
- 7454,
- 7478,
- 7502,
- 7531,
- 7562,
- 7592,
- 7615,
- 7639,
- 7663,
- 7692,
- 7714,
- 7744,
- 7766,
- 7782,
- 7811,
- 7840,
- 7874,
- 7916,
- 7942,
- 7967,
- 8008,
- 8049,
- 8079,
- 8108,
- 8142,
- 8184,
- 8198,
- 8214,
- 8237,
- 8259,
- 8281,
- 8313,
- 8333,
- 8368,
- 8384,
- 8398,
- 8412,
- 8452,
- 8468,
- 8492,
- 8523,
- 8553,
- 8582,
- 8614,
- 8653,
- 8682,
- 8711,
- 8743,
- 8769,
- 8800,
- 8831,
- 8862,
- 8889,
- 8924,
- 8959,
- 8987,
- 9013,
- 9071,
- 9097,
- 9121,
- 9153,
- 9171,
- 9206,
- 9232,
- 9251,
- 9276,
- 9301,
- 9342,
- 9374,
- 9397,
- 9419,
- 9460,
- 9500,
- 9532,
- 9565,
- 9586,
- 9607,
- 9636,
- 9663,
- 9688,
- 9709,
- 9734,
- 9757,
- 9790,
- 9812,
- 9838,
- 9860,
- 9882,
- 9906,
- 9932,
- 9953,
- 9976,
- 10002,
- 10021,
- 10048,
- 10078,
- 10150,
- 10180,
- 10208,
- 10229,
- 10254,
- 10280,
- 10309,
- 10340,
- 10366,
- 10392,
- 10416,
- 10440,
- 10465,
- 10493,
- 10516,
- 10542,
- 10565,
- 10589,
- 10611,
- 10631,
- 10662,
- 10685,
- 10711,
- 10738,
- 10756,
- 10780,
- 10814,
- 10842,
- 10889,
- 10913,
- 10933,
- 10952,
- 10975,
- 11001,
- 11059,
- 11081,
- 11109,
- 11141,
- 11164,
- 11186,
- 11213,
- 11242,
- 11270,
- 11295,
- 11320,
- 11350,
- 11374,
- 11402,
- 11422,
- 11449,
- 11483,
- 11502,
- 11517,
- 11537,
- 11561,
- 11587,
- 11610,
- 11633,
- 11647,
- 11663,
- 11707,
- 11761,
- 11808,
- 11860,
- 11885,
- 11939,
- 11986,
- 12038,
- 12065,
- 12095,
- 12127,
- 12157,
- 12184,
- 12216,
- 12248,
- 12276,
- 12307,
- 12332,
- 12358,
- 12383,
- 12416,
- 12445,
- 12467,
- 12501,
- 12528,
- 12551,
- 12587,
- 12613,
- 12646,
- 12678,
- 12707,
- 12738,
- 12764,
- 12785,
- 12811,
- 12843,
- 12890,
- 12913,
- 12937,
- 12958,
- 12981,
- 13005,
- 13031,
- 13061,
- 13090,
- 13118,
- 13145,
- 13167,
- 13191,
- 13214,
- 13234,
- 13263,
- 13293,
- 13321,
- 13350,
- 13376,
- 13405,
- 13430,
- 13464,
- 13490,
- 13513,
- 13546,
- 13569,
- 13592,
- 13615,
- 13637,
- 13660,
- 13684,
- 13706,
- 13728,
- 13758,
- 13784,
- 13815,
- 13840,
- 13867,
- 13899,
- 13929,
- 13959,
- 13989,
- 14021,
- 14054,
- 14083,
- 14115,
- 14144,
- 14176,
- 14205,
- 14230,
- 14262,
- 14290,
- 14320,
- 14351,
- 14381,
- 14412,
- 14444,
- 14477,
- 14510,
- 14543,
- 14577,
- 14603,
- 14632,
- 14656,
- 14689,
- 14715,
- 14742,
- 14764,
- 14791,
- 14820,
- 14843,
- 14869,
- 14897,
- 14921,
- 14945,
- 14976,
- 15006,
- 15031,
- 15083,
- 15110,
- 15135,
- 15178,
- 15207,
- 15231,
- 15262,
- 15289,
- 15317,
- 15331,
- 15347,
- 15371,
- 15398,
- 15425,
- 15463,
- 15483,
- 15510,
- 15524,
- 15540,
- 15572,
- 15606,
- 15646,
- 15679,
- 15708,
- 15743,
- 15780,
- 15816,
- 15840,
- 15866,
- 15890,
- 15916,
- 15951,
- 15980,
- 16003,
- 16035,
- 16056,
- 16077,
- 16097,
- 16141,
- 16165,
- 16193,
- 16223,
- 16250,
- 16276,
- 16306,
- 16333,
- 16359,
- 16392,
- 16427,
- 16458,
- 16483,
- 16509,
- 16535,
- 16559,
- 16582,
- 16607,
- 16628,
- 16648,
- 16672,
- 16696,
- 16717,
- 16738,
- 16757,
+ 2802,
+ 2832,
+ 2865,
+ 2902,
+ 2938,
+ 2970,
+ 3016,
+ 3059,
+ 3103,
+ 3140,
+ 3176,
+ 3228,
+ 3277,
+ 3310,
+ 3357,
+ 3388,
+ 3421,
+ 3435,
+ 3469,
+ 3503,
+ 3582,
+ 3619,
+ 3655,
+ 3682,
+ 3722,
+ 3751,
+ 3765,
+ 3803,
+ 3843,
+ 3887,
+ 3903,
+ 3943,
+ 3981,
+ 4012,
+ 4034,
+ 4048,
+ 4099,
+ 4124,
+ 4149,
+ 4171,
+ 4203,
+ 4226,
+ 4254,
+ 4287,
+ 4320,
+ 4348,
+ 4385,
+ 4417,
+ 4452,
+ 4517,
+ 4545,
+ 4584,
+ 4613,
+ 4644,
+ 4675,
+ 4701,
+ 4729,
+ 4757,
+ 4794,
+ 4824,
+ 4849,
+ 4891,
+ 4924,
+ 4951,
+ 4974,
+ 5001,
+ 5022,
+ 5050,
+ 5075,
+ 5105,
+ 5129,
+ 5157,
+ 5186,
+ 5208,
+ 5230,
+ 5265,
+ 5287,
+ 5310,
+ 5343,
+ 5371,
+ 5397,
+ 5438,
+ 5475,
+ 5508,
+ 5536,
+ 5567,
+ 5583,
+ 5617,
+ 5661,
+ 5691,
+ 5736,
+ 5758,
+ 5778,
+ 5791,
+ 5818,
+ 5841,
+ 5874,
+ 5902,
+ 5930,
+ 5963,
+ 5996,
+ 6024,
+ 6051,
+ 6109,
+ 6123,
+ 6139,
+ 6174,
+ 6194,
+ 6221,
+ 6258,
+ 6297,
+ 6324,
+ 6368,
+ 6398,
+ 6419,
+ 6443,
+ 6459,
+ 6495,
+ 6528,
+ 6550,
+ 6564,
+ 6583,
+ 6624,
+ 6638,
+ 6670,
+ 6690,
+ 6711,
+ 6725,
+ 6741,
+ 6764,
+ 6809,
+ 6843,
+ 6868,
+ 6894,
+ 6930,
+ 6964,
+ 6989,
+ 7011,
+ 7038,
+ 7057,
+ 7080,
+ 7114,
+ 7135,
+ 7157,
+ 7185,
+ 7202,
+ 7225,
+ 7250,
+ 7274,
+ 7299,
+ 7324,
+ 7354,
+ 7384,
+ 7421,
+ 7451,
+ 7475,
+ 7499,
+ 7528,
+ 7559,
+ 7589,
+ 7612,
+ 7636,
+ 7660,
+ 7689,
+ 7711,
+ 7741,
+ 7763,
+ 7779,
+ 7808,
+ 7837,
+ 7871,
+ 7913,
+ 7939,
+ 7964,
+ 8005,
+ 8046,
+ 8076,
+ 8105,
+ 8139,
+ 8181,
+ 8195,
+ 8211,
+ 8234,
+ 8256,
+ 8278,
+ 8310,
+ 8330,
+ 8365,
+ 8381,
+ 8395,
+ 8409,
+ 8449,
+ 8465,
+ 8489,
+ 8520,
+ 8550,
+ 8579,
+ 8611,
+ 8650,
+ 8679,
+ 8708,
+ 8740,
+ 8766,
+ 8797,
+ 8828,
+ 8859,
+ 8886,
+ 8921,
+ 8956,
+ 8984,
+ 9010,
+ 9068,
+ 9094,
+ 9118,
+ 9150,
+ 9168,
+ 9203,
+ 9229,
+ 9248,
+ 9273,
+ 9298,
+ 9339,
+ 9371,
+ 9394,
+ 9416,
+ 9457,
+ 9497,
+ 9529,
+ 9562,
+ 9583,
+ 9604,
+ 9633,
+ 9660,
+ 9685,
+ 9706,
+ 9731,
+ 9754,
+ 9787,
+ 9809,
+ 9835,
+ 9857,
+ 9879,
+ 9903,
+ 9929,
+ 9950,
+ 9973,
+ 9999,
+ 10018,
+ 10045,
+ 10075,
+ 10147,
+ 10177,
+ 10205,
+ 10226,
+ 10251,
+ 10277,
+ 10306,
+ 10337,
+ 10363,
+ 10389,
+ 10413,
+ 10437,
+ 10462,
+ 10490,
+ 10513,
+ 10539,
+ 10562,
+ 10586,
+ 10608,
+ 10628,
+ 10659,
+ 10682,
+ 10708,
+ 10735,
+ 10753,
+ 10777,
+ 10811,
+ 10839,
+ 10886,
+ 10910,
+ 10930,
+ 10949,
+ 10972,
+ 10998,
+ 11056,
+ 11078,
+ 11106,
+ 11138,
+ 11161,
+ 11183,
+ 11210,
+ 11239,
+ 11267,
+ 11292,
+ 11317,
+ 11347,
+ 11371,
+ 11399,
+ 11419,
+ 11446,
+ 11480,
+ 11499,
+ 11514,
+ 11534,
+ 11558,
+ 11584,
+ 11607,
+ 11630,
+ 11644,
+ 11660,
+ 11704,
+ 11758,
+ 11805,
+ 11857,
+ 11882,
+ 11936,
+ 11983,
+ 12035,
+ 12062,
+ 12092,
+ 12124,
+ 12154,
+ 12181,
+ 12213,
+ 12245,
+ 12273,
+ 12304,
+ 12329,
+ 12355,
+ 12380,
+ 12413,
+ 12442,
+ 12464,
+ 12498,
+ 12525,
+ 12548,
+ 12584,
+ 12610,
+ 12643,
+ 12675,
+ 12704,
+ 12735,
+ 12761,
+ 12782,
+ 12808,
+ 12840,
+ 12887,
+ 12910,
+ 12934,
+ 12955,
+ 12978,
+ 13002,
+ 13028,
+ 13058,
+ 13087,
+ 13115,
+ 13142,
+ 13164,
+ 13188,
+ 13211,
+ 13231,
+ 13260,
+ 13290,
+ 13318,
+ 13347,
+ 13373,
+ 13402,
+ 13427,
+ 13461,
+ 13487,
+ 13510,
+ 13543,
+ 13566,
+ 13589,
+ 13612,
+ 13634,
+ 13657,
+ 13681,
+ 13703,
+ 13725,
+ 13755,
+ 13781,
+ 13812,
+ 13837,
+ 13864,
+ 13896,
+ 13926,
+ 13956,
+ 13986,
+ 14018,
+ 14051,
+ 14080,
+ 14112,
+ 14141,
+ 14173,
+ 14202,
+ 14227,
+ 14259,
+ 14287,
+ 14317,
+ 14348,
+ 14378,
+ 14409,
+ 14441,
+ 14474,
+ 14507,
+ 14540,
+ 14574,
+ 14600,
+ 14629,
+ 14653,
+ 14686,
+ 14712,
+ 14739,
+ 14761,
+ 14788,
+ 14817,
+ 14840,
+ 14866,
+ 14894,
+ 14918,
+ 14942,
+ 14973,
+ 15003,
+ 15028,
+ 15080,
+ 15107,
+ 15132,
+ 15175,
+ 15204,
+ 15228,
+ 15259,
+ 15286,
+ 15314,
+ 15328,
+ 15344,
+ 15368,
+ 15395,
+ 15422,
+ 15460,
+ 15480,
+ 15507,
+ 15521,
+ 15537,
+ 15569,
+ 15603,
+ 15643,
+ 15676,
+ 15705,
+ 15740,
+ 15777,
+ 15813,
+ 15837,
+ 15863,
+ 15887,
+ 15913,
+ 15948,
+ 15977,
+ 16000,
+ 16032,
+ 16053,
+ 16074,
+ 16094,
+ 16138,
+ 16162,
+ 16190,
+ 16220,
+ 16247,
+ 16273,
+ 16303,
+ 16330,
+ 16356,
+ 16389,
+ 16424,
+ 16455,
+ 16480,
+ 16506,
+ 16532,
+ 16556,
+ 16579,
+ 16604,
+ 16625,
+ 16645,
+ 16669,
+ 16693,
+ 16714,
+ 16735,
+ 16754,
0
};
#endif /* if defined(_INCLUDE_MESSAGE_TABLE_) */
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Log methods.
+*/
+
+extern MagickExport void
+ DestroyLogInfo(void);
+
+extern MagickPassFail
+ InitializeLogInfo(void);
+
+extern MagickPassFail
+ InitializeLogInfoPost(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
*p;
struct tm
+#if defined(HAVE_LOCALTIME_R)
+ tm_buf,
+#endif /* if defined(HAVE_LOCALTIME_R) */
*time_meridian;
time_t
# endif
#endif
seconds=time((time_t *) NULL);
- time_meridian=localtime(&seconds);
+#if defined(HAVE_LOCALTIME_R)
+ time_meridian=localtime_r(&seconds, &tm_buf);
+#else
+ time_meridian=localtime(&seconds); /* Thread-unsafe version */
+#endif /* if defined(HAVE_LOCALTIME_R) */
elapsed_time=GetElapsedTime(&log_info->timer);
user_time=GetUserTime(&log_info->timer);
(void) ContinueTimer((TimerInfo *) &log_info->timer);
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
SetLogMethod(LogMethod);
#if defined(MAGICK_IMPLEMENTATION)
-
-extern MagickExport void
- DestroyLogInfo(void);
-
-extern MagickPassFail
- InitializeLogInfo(void);
-
-extern MagickPassFail
- InitializeLogInfoPost(void);
-
+# include "magick/log-private.h"
#endif /* MAGICK_IMPLEMENTATION */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Magic methods.
+*/
+
+extern MagickExport MagickPassFail
+ InitializeMagicInfo(void);
+
+extern MagickExport void
+ DestroyMagicInfo(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
*/
for (i=0; i < ArraySize(StaticMagic); i++)
{
- if (StaticMagic[i].offset+StaticMagic[i].length <= header_length)
+ if ((size_t) StaticMagic[i].offset+StaticMagic[i].length <= header_length)
{
if ((header[StaticMagic[i].offset] == StaticMagic[i].magic[0]) &&
(memcmp(header+StaticMagic[i].offset,StaticMagic[i].magic,
/*
- Copyright (C) 2003 - 2009 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
ListMagicInfo(FILE *file,ExceptionInfo *exception);
#if defined(MAGICK_IMPLEMENTATION)
-
-extern MagickExport MagickPassFail
- InitializeMagicInfo(void);
-
-extern MagickExport void
- DestroyMagicInfo(void);
-
+# include "magick/magic-private.h"
#endif /* MAGICK_IMPLEMENTATION */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+ Copyright 1991-1999 E. I. du Pont de Nemours and Company
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Application Programming Interface declarations.
+*/
+
+/*
+ Get blocksize to use when accessing the filesystem.
+*/
+extern size_t
+MagickGetFileSystemBlockSize(void) MAGICK_FUNC_PURE;
+
+/*
+ Set blocksize to use when accessing the filesystem.
+*/
+extern void
+MagickSetFileSystemBlockSize(const size_t block_size);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
static MagickInfo
*magick_list = (MagickInfo *) NULL;
+static unsigned int initialize_magick_options = 0;
+
static unsigned int panic_signal_handler_call_count = 0;
static unsigned int quit_signal_handler_call_count = 0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% InitializeMagick() initializes the GraphicsMagick environment.
-% InitializeMagick() MUST be invoked by the using program before making
-% use of GraphicsMagick functions or else the library will be unusable.
+%
+% InitializeMagick() or InitializeMagickEx() MUST be invoked by the using
+% program before making use of GraphicsMagick functions or else the library
+% will be unusable and any usage is likely to cause a crash.
%
% This function should be invoked in the primary (original) thread of the
% application's process, and before starting any OpenMP threads, as part
% of program initialization.
%
+% If alternate memory allocations are provided via MagickAllocFunctions()
+% then that function should be invoked before InitializeMagickEx() since
+% the memory allocation functions need to be consistent.
+%
% The format of the InitializeMagick function is:
%
% InitializeMagick(const char *path)
%
% A description of each parameter follows:
%
-% o path: The execution path of the current GraphicsMagick client.
+% o path: The execution path of the current GraphicsMagick client (or NULL)
%
%
*/
/*
Try and figure out the path and name of the client
*/
-MagickExport void
+static void
InitializeMagickClientPathAndName(const char *path)
{
#if !defined(UseInstalledMagick)
Establish signal handlers for common signals
*/
-MagickExport void
+static void
InitializeMagickSignalHandlers(void)
{
#if 0
#if defined(SIGSEGV)
(void) MagickCondSignal(SIGSEGV,MagickPanicSignalHandler);
#endif
- /* exceeded cpu limit, default terminate with core */
+ /* exceeded cpu limit, default terminate */
#if defined(SIGXCPU)
- (void) MagickCondSignal(SIGXCPU,MagickPanicSignalHandler);
+ (void) MagickCondSignal(SIGXCPU,MagickSignalHandler);
#endif
- /* exceeded file size limit, default terminate with core */
+ /* exceeded file size limit, default terminate */
#if defined(SIGXFSZ)
- (void) MagickCondSignal(SIGXFSZ,MagickPanicSignalHandler);
+ (void) MagickCondSignal(SIGXFSZ,MagickSignalHandler);
#endif
}
+
MagickExport void
InitializeMagick(const char *path)
{
+ ExceptionInfo exception;
+ GetExceptionInfo(&exception);
+ (void) InitializeMagickEx(path,0,&exception);
+ if (exception.severity != UndefinedException)
+ CatchException(&exception);
+ DestroyExceptionInfo(&exception);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% I n i t i a l i z e M a g i c k E x %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InitializeMagickEx() initializes the GraphicsMagick environment,
+% providing a bit more more control and visibility over initialization
+% than the original InitializeMagick().
+%
+% InitializeMagick() or InitializeMagickEx() MUST be invoked by the using
+% program before making use of GraphicsMagick functions or else the library
+% will be unusable and any usage is likely to cause a crash.
+%
+% This function should be invoked in the primary (original) thread of the
+% application's process, and before starting any OpenMP threads, as part
+% of program initialization.
+%
+% If alternate memory allocations are provided via MagickAllocFunctions()
+% then that function should be invoked before InitializeMagickEx() since
+% the memory allocation functions need to be consistent.
+%
+% The format of the InitializeMagickEx function is:
+%
+% MagickPassFail InitializeMagickEx(const char *path,
+% unsigned int options,
+% ExceptionInfo *exception)
+%
+% A description of each parameter follows:
+%
+% o path: The execution path of the current GraphicsMagick client (or NULL)
+%
+% o options: Options flags tailoring initializations performed
+%
+% o exception: Information about initialization failure is reported here.
+%
+%
+*/
+
+MagickExport MagickPassFail
+InitializeMagickEx(const char *path, unsigned int options,
+ ExceptionInfo *exception)
+{
/*
NOTE: This routine sets up the path to the client which needs to
be determined before almost anything else works right. This also
const char
*p;
+ MagickPassFail
+ status = MagickPass;
+
+ (void) exception;
+
/* Acquire initialization lock */
SPINLOCK_WAIT;
{
/* Release initialization lock */
SPINLOCK_RELEASE;
- return;
+ return status;
}
+ /* Save initialization options in case we need them later */
+ initialize_magick_options = options;
+
#if defined(MSWINDOWS)
# if defined(_DEBUG) && !defined(__BORLANDC__)
{
#if defined(MSWINDOWS)
NTInitializeExceptionHandlers(); /* WIN32 Exceptions */
#endif /* defined(MSWINDOWS) */
- InitializeMagickSignalHandlers(); /* Signal handlers */
+ if (!(options & MAGICK_OPT_NO_SIGNAL_HANDER))
+ InitializeMagickSignalHandlers(); /* Signal handlers */
InitializeTemporaryFiles(); /* Temporary files */
InitializeMagickResources(); /* Resources */
InitializeMagickRegistry(); /* Image/blob registry */
/* Release initialization lock */
SPINLOCK_RELEASE;
+
+ return status;
}
\f
/*
%
%
*/
-MagickPassFail
+static MagickPassFail
InitializeMagickInfoList(void)
{
assert(magick_semaphore == (SemaphoreInfo *) NULL);
{ "gif", "image/gif" },
{ "gif87", "image/gif" },
{ "jpeg", "image/jpeg" },
+ { "jpg", "image/jpeg" },
{ "mng", "video/x-mng" },
{ "mpeg", "video/mpeg" },
{ "png", "image/png" },
*magick_info;
assert(name != (const char *) NULL);
- magick_info=MagickAllocateMemory(MagickInfo *,sizeof(MagickInfo));
+ magick_info=MagickAllocateClearedMemory(MagickInfo *,sizeof(MagickInfo));
if (magick_info == (MagickInfo *) NULL)
MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed,
UnableToAllocateMagickInfo);
- (void) memset(magick_info,0,sizeof(MagickInfo));
magick_info->name=name;
magick_info->adjoin=MagickTrue;
magick_info->raw=MagickFalse;
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
Copyright 1991-1999 E. I. du Pont de Nemours and Company
extern "C" {
#endif
+/*
+ Flags to form options passed to InitializeMagickEx
+*/
+#define MAGICK_OPT_NO_SIGNAL_HANDER 0x0001 /* Don't register ANSI/POSIX signal handlers */
+
typedef Image
*(*DecoderHandler)(const ImageInfo *,ExceptionInfo *);
extern MagickExport MagickPassFail
ListModuleMap(FILE *file,ExceptionInfo *exception),
ListMagickInfo(FILE *file,ExceptionInfo *exception),
+ InitializeMagickEx(const char *path, unsigned int options,
+ ExceptionInfo *exception),
UnregisterMagickInfo(const char *name);
extern MagickExport void
*SetMagickInfo(const char *name);
#if defined(MAGICK_IMPLEMENTATION)
-
- /*
- Get blocksize to use when accessing the filesystem.
- */
- extern size_t
- MagickGetFileSystemBlockSize(void) MAGICK_FUNC_PURE;
-
- /*
- Set blocksize to use when accessing the filesystem.
- */
- extern void
- MagickSetFileSystemBlockSize(const size_t block_size);
-
+# include "magick/magick-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
/* Define to 1 if you have the `getpid' function. */
#undef HAVE_GETPID
+/* Define to 1 if you have the `getpwnam_r' function. */
+#undef HAVE_GETPWNAM_R
+
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
/*
- Copyright (C) 2003 - 2013 GraphicsMagick Group
-
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
-
+
GraphicsMagick types typedefs.
GraphicsMagick is expected to compile with any C '89 ANSI C compiler
#endif
/*
- Assign ANSI C stdint.h-like typedefs based on the sizes of native types
+ Assign ANSI C'99 stdint.h-like typedefs based on the sizes of native types
magick_int8_t -- -128 to 127
magick_uint8_t -- 0 to 255
magick_int16_t -- -32,768 to 32,767
magick_uintptr_t -- unsigned type for storing a pointer value ("%tu")
0 to UINTPTR_MAX
- ANSI C '99 stddef.h-like types
+ ANSI C '89 stddef.h-like types
size_t -- unsigned type representing sizes of objects ("%zu")
0 to SIZE_MAX
- magick_ptrdiff_t -- signed type for subtracting two pointers ("%td")
+ ptrdiff_t -- signed type for subtracting two pointers ("%td")
PTRDIFF_MIN to PTRDIFF_MAX
- EEE Std 1003.1, 2004 types
+ IEEE Std 1003.1 (1990), 2004 types. Not part of ANSI C!
ssize_t -- signed type for a count of bytes or an error indication ("%zd")
? to SSIZE_MAX
*/
/*
- Copyright (C) 2003 - 2013 GraphicsMagick Group
-
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
-
+
GraphicsMagick types typedefs.
GraphicsMagick is expected to compile with any C '89 ANSI C compiler
#endif
/*
- Assign ANSI C stdint.h-like typedefs based on the sizes of native types
+ Assign ANSI C'99 stdint.h-like typedefs based on the sizes of native types
magick_int8_t -- -128 to 127
magick_uint8_t -- 0 to 255
magick_int16_t -- -32,768 to 32,767
magick_uintptr_t -- unsigned type for storing a pointer value ("%tu")
0 to UINTPTR_MAX
- ANSI C '99 stddef.h-like types
+ ANSI C '89 stddef.h-like types
size_t -- unsigned type representing sizes of objects ("%zu")
0 to SIZE_MAX
- magick_ptrdiff_t -- signed type for subtracting two pointers ("%td")
+ ptrdiff_t -- signed type for subtracting two pointers ("%td")
PTRDIFF_MIN to PTRDIFF_MAX
- EEE Std 1003.1, 2004 types
+ IEEE Std 1003.1 (1990), 2004 types. Not part of ANSI C!
ssize_t -- signed type for a count of bytes or an error indication ("%zd")
? to SSIZE_MAX
*/
--- /dev/null
+/*
+ Copyright (C) 2003-2020 GraphicsMagick Group
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Memory Allocation Methods.
+*/
+
+extern MagickExport void
+ *MagickMallocAlignedArray(const size_t alignment,const size_t count,const size_t size) MAGICK_FUNC_MALLOC MAGICK_FUNC_ALLOC_SIZE_2ARG(2,3),
+ *MagickMallocArray(const size_t count,const size_t size) MAGICK_FUNC_MALLOC MAGICK_FUNC_ALLOC_SIZE_2ARG(1,2);
+
+extern MagickExport size_t
+ MagickArraySize(const size_t count,const size_t size) MAGICK_FUNC_CONST;
+
+/*
+ Allocate memory
+*/
+#define MagickAllocateMemory(type,size) \
+ ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
+ ((type) MagickMalloc((size_t) (size))))
+
+#define MagickAllocateClearedMemory(type,size) \
+ ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
+ ((type) MagickMallocCleared((size_t) (size))))
+
+#define MagickAllocateArray(type,count,size) \
+ ((type) MagickMallocArray(count,size))
+
+#define MagickAllocateClearedArray(type,count,size) \
+ ((type) MagickMallocCleared(MagickArraySize(count,size)))
+/*
+ Free memory and set pointer to NULL
+*/
+#define MagickFreeMemory(memory) \
+{ \
+ void *_magick_mp=memory; \
+ MagickFree(_magick_mp); \
+ memory=0; \
+}
+
+/*
+ Reallocate memory using provided pointer. If reallocation fails
+ then free memory, setting pointer to null. If size is 0 and memory
+ is not a null pointer, then free memory. This interface behaves
+ similar to realloc() except that memory is always freed (and pointer
+ set to null) if a memory allocation failure occurs.
+*/
+#define MagickReallocMemory(type,memory,size) \
+{ \
+ size_t _new_size = (size_t) (size); \
+ void *_magick_mp = MagickRealloc(memory,_new_size); \
+ memory=(type) _magick_mp; \
+}
+
+/*
+ Allocate memory aligned to a specified alignment boundary
+*/
+#define MagickAllocateAlignedMemory(type,alignment,size) \
+ ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
+ ((type) MAGICK_ASSUME_ALIGNED(MagickMallocAligned((size_t) alignment, (size_t) (size)),alignment)))
+
+/*
+ Allocate array aligned to a specified alignment boundary
+*/
+#define MagickAllocateAlignedArray(type,alignment,count,size) \
+ ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
+ ((type) MAGICK_ASSUME_ALIGNED(MagickMallocAlignedArray((size_t) alignment, (size_t) (count), (size_t) (size)),alignment)))
+
+/*
+ Free aligned memory (from MagickAllocateAlignedMemory()) and set pointer to
+ NULL
+*/
+#define MagickFreeAlignedMemory(memory) \
+{ \
+ void *_magick_mp=memory; \
+ MagickFreeAligned(_magick_mp); \
+ memory=0; \
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003-2018 GraphicsMagick Group
+ Copyright (C) 2003-2020 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
MagickFreeAligned(void *memory);
#if defined(MAGICK_IMPLEMENTATION)
-
-extern MagickExport void
- *MagickMallocAlignedArray(const size_t alignment,const size_t count,const size_t size) MAGICK_FUNC_MALLOC MAGICK_FUNC_ALLOC_SIZE_2ARG(2,3),
- *MagickMallocArray(const size_t count,const size_t size) MAGICK_FUNC_MALLOC MAGICK_FUNC_ALLOC_SIZE_2ARG(1,2);
-
-extern MagickExport size_t
- MagickArraySize(const size_t count,const size_t size) MAGICK_FUNC_CONST;
-
-/*
- Allocate memory
-*/
-
-#define MagickAllocateMemory(type,size) \
- ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
- ((type) MagickMalloc((size_t) (size))))
-
-#define MagickAllocateClearedMemory(type,size) \
- ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
- ((type) MagickMallocCleared((size_t) (size))))
-
-#define MagickAllocateArray(type,count,size) \
- ((type) MagickMallocArray(count,size))
-
-#define MagickAllocateClearedArray(type,count,size) \
- ((type) MagickMallocCleared(MagickArraySize(count,size)))
-/*
- Free memory and set pointer to NULL
-*/
-#define MagickFreeMemory(memory) \
-{ \
- void *_magick_mp=memory; \
- MagickFree(_magick_mp); \
- memory=0; \
-}
-
-/*
- Reallocate memory using provided pointer. If reallocation fails
- then free memory, setting pointer to null. If size is 0 and memory
- is not a null pointer, then free memory. This interface behaves
- similar to realloc() except that memory is always freed (and pointer
- set to null) if a memory allocation failure occurs.
-*/
-#define MagickReallocMemory(type,memory,size) \
-{ \
- size_t _new_size = (size_t) (size); \
- void *_magick_mp = MagickRealloc(memory,_new_size); \
- memory=(type) _magick_mp; \
-}
-
-/*
- Allocate memory aligned to a specified alignment boundary
-*/
-#define MagickAllocateAlignedMemory(type,alignment,size) \
- ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
- ((type) MAGICK_ASSUME_ALIGNED(MagickMallocAligned((size_t) alignment, (size_t) (size)),alignment)))
-
-/*
- Allocate array aligned to a specified alignment boundary
-*/
-#define MagickAllocateAlignedArray(type,alignment,count,size) \
- ((((size) != ((size_t) (size))) || (size == 0)) ? ((type) 0) : \
- ((type) MAGICK_ASSUME_ALIGNED(MagickMallocAlignedArray((size_t) alignment, (size_t) (count), (size_t) (size)),alignment)))
-
-/*
- Free aligned memory (from MagickAllocateAlignedMemory()) and set pointer to
- NULL
-*/
-#define MagickFreeAlignedMemory(memory) \
-{ \
- void *_magick_mp=memory; \
- MagickFreeAligned(_magick_mp); \
- memory=0; \
-}
-
+#include "magick/memory-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Modules Methods.
+*/
+
+/*
+ Module alias list entry
+ Maintains modules.mgk path, and the module name corresponding
+ to each magick tag.
+ Used to support module_list, which is intialized by reading modules.mgk,
+*/
+typedef struct _ModuleInfo
+{
+ char
+ *path, /* Path to modules.mgk which created alias */
+ *magick, /* Format name */
+ *name; /* Name of module supporting format. */
+
+ unsigned int
+ stealth; /* If true, hide when printing module list */
+
+ unsigned long
+ signature;
+
+ struct _ModuleInfo
+ *previous,
+ *next;
+} ModuleInfo;
+
+extern const ModuleInfo
+ *GetModuleInfo(const char *,ExceptionInfo *);
+
+extern MagickPassFail
+ ExecuteStaticModuleProcess(const char *,Image **,const int,char **),
+ ListModuleInfo(FILE *file,ExceptionInfo *exception),
+ OpenModule(const char *module,ExceptionInfo *exception),
+ OpenModules(ExceptionInfo *exception);
+
+extern void
+ DestroyModuleInfo(void),
+ DestroyMagickModules(void),
+ InitializeMagickModules(void),
+ RegisterStaticModules(void) MAGICK_FUNC_DEPRECATED,
+ UnregisterStaticModules(void) MAGICK_FUNC_DEPRECATED;
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
max_entries;
max_entries=MAX_MODULES;
- modules=MagickAllocateMemory(char **,(max_entries+1)*sizeof(char *));
+ modules=MagickAllocateArray(char **,((size_t) max_entries+1),sizeof(char *));
if (modules == (char **) NULL)
return((char **) NULL);
modules[0]=(char *) NULL;
const char
*seperator;
- int
+ size_t
length;
MagickBool
Allocate memory for the module list.
*/
in_entry=MagickTrue;
- module_info=MagickAllocateMemory(ModuleInfo *,sizeof(ModuleInfo));
+ module_info=MagickAllocateClearedMemory(ModuleInfo *,sizeof(ModuleInfo));
if (module_info == (ModuleInfo *) NULL)
MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed,
UnableToAllocateModuleInfo);
- (void) memset(module_info,0,sizeof(ModuleInfo));
module_info->path=AcquireString(path);
module_info->signature=MagickSignature;
if (module_list == (ModuleInfo *) NULL)
*entry;
assert(tag != (const char *) NULL);
- entry=MagickAllocateMemory(CoderInfo *,sizeof(CoderInfo));
+ entry=MagickAllocateClearedMemory(CoderInfo *,sizeof(CoderInfo));
if (entry == (CoderInfo *) NULL)
MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed,
UnableToAllocateModuleInfo);
- (void) memset(entry,0,sizeof(CoderInfo));
entry->tag=AcquireString(tag);
entry->signature=MagickSignature;
return(entry);
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
#if defined(MAGICK_IMPLEMENTATION)
-
-/*
- Module alias list entry
- Maintains modules.mgk path, and the module name corresponding
- to each magick tag.
- Used to support module_list, which is intialized by reading modules.mgk,
-*/
-typedef struct _ModuleInfo
-{
- char
- *path, /* Path to modules.mgk which created alias */
- *magick, /* Format name */
- *name; /* Name of module supporting format. */
-
- unsigned int
- stealth; /* If true, hide when printing module list */
-
- unsigned long
- signature;
-
- struct _ModuleInfo
- *previous,
- *next;
-} ModuleInfo;
-
-extern const ModuleInfo
- *GetModuleInfo(const char *,ExceptionInfo *);
-
-extern MagickPassFail
- ExecuteStaticModuleProcess(const char *,Image **,const int,char **),
- ListModuleInfo(FILE *file,ExceptionInfo *exception),
- OpenModule(const char *module,ExceptionInfo *exception),
- OpenModules(ExceptionInfo *exception);
-
-extern void
- DestroyModuleInfo(void),
- DestroyMagickModules(void),
- InitializeMagickModules(void),
- RegisterStaticModules(void) MAGICK_FUNC_DEPRECATED,
- UnregisterStaticModules(void) MAGICK_FUNC_DEPRECATED;
-
+#include "magick/module-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+ Copyright 1991-1999 E. I. du Pont de Nemours and Company
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Progress Monitor Methods.
+*/
+
+extern void
+DestroyMagickMonitor(void);
+
+extern MagickPassFail
+InitializeMagickMonitor(void);
+
+extern MagickBool
+MagickMonitorActive(void) MAGICK_FUNC_PURE;
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003 - 2019 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
Copyright 1991-1999 E. I. du Pont de Nemours and Company
typedef MagickPassFail
(*MonitorHandler)(const char *text,const magick_int64_t quantum,
const magick_uint64_t span,ExceptionInfo *exception);
- \f
+\f
/*
Monitor declarations.
*/
const char *format,...) MAGICK_ATTRIBUTE((__format__ (__printf__,4,5)));
#if defined(MAGICK_IMPLEMENTATION)
-
- extern void
- DestroyMagickMonitor(void);
-
- extern MagickPassFail
- InitializeMagickMonitor(void);
-
- extern MagickBool
- MagickMonitorActive(void) MAGICK_FUNC_PURE;
-
+# include "magick/monitor-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
title=TranslateText(image_info,image_list[0],montage_info->title);
title_offset=0;
if (montage_info->title != (char *) NULL)
- title_offset=(unsigned long) (2*(metrics.ascent-metrics.descent)*
- MultilineCensus(title)+2*tile_info.y);
+ title_offset=(unsigned long) (2.0*(metrics.ascent-metrics.descent)*
+ (double) MultilineCensus(title)+2.0*tile_info.y);
number_lines=0;
for (i=0; i < (long) number_images; i++)
{
{
return((unsigned char *) NULL);
}
- blob=MagickAllocateMemory(unsigned char *,length+1);
+ blob=MagickAllocateMemory(unsigned char *,(size_t) length+1);
if (blob != (unsigned char *) NULL)
{
(void) memcpy(blob,value,length);
NTGhostscriptLoadDLL(void),
NTGhostscriptUnLoadDLL(void);
-#if defined(MAGICK_IMPLEMENTATION)
extern MagickExport const GhostscriptVectors
*NTGhostscriptDLLVectors( void );
-#endif /* defined(MAGICK_IMPLEMENTATION) */
/*
Directory access functions
bitmap.bmBits = NULL;
bitmap_bitsH = (HANDLE) GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE,
- page.width*page.height*bitmap.bmBitsPixel);
+ (size_t) page.width*page.height*bitmap.bmBitsPixel);
if (bitmap_bitsH == NULL)
return( NULL );
#include "magick/enum_strings.h"
#include "magick/gem.h"
#include "magick/pixel_iterator.h"
-#include "magick/random-private.h"
#include "magick/random.h"
#include "magick/utility.h"
#include "magick/operator.h"
#define FuzzyOpacityMatch(color,target,fuzz) \
(((color)->opacity == (target)->opacity) && \
FuzzyColorMatch(color,target,fuzz))
-#define MaxStacksize (1 << 15)
+#define MaxStacksize (((size_t) 1) << 15)
#define Push(up,left,right,delta) \
- if ((s < (segment_stack+MaxStacksize)) && (((up)+(delta)) >= 0) && \
- (((up)+(delta)) < (long) image->rows)) \
+ if ((s < (segment_stack+MaxStacksize)) && \
+ ((((ptrdiff_t)up)+((ptrdiff_t)delta)) >= 0) && \
+ ((((ptrdiff_t)up)+((ptrdiff_t)delta)) < (long) image->rows)) \
{ \
s->y1=(up); \
s->x1=(left); \
*/
if (FuzzyColorMatch(&draw_info->fill,&target,image->fuzz))
return(MagickFail);
- floodplane=MagickAllocateMemory(unsigned char *,image->columns*image->rows);
- segment_stack=MagickAllocateMemory(SegmentInfo *,MaxStacksize*sizeof(SegmentInfo));
+ floodplane=MagickAllocateClearedArray(unsigned char *,image->columns,image->rows);
+ segment_stack=MagickAllocateArray(SegmentInfo *,MaxStacksize,sizeof(SegmentInfo));
if ((floodplane== (unsigned char *) NULL) ||
(segment_stack == (SegmentInfo *) NULL))
{
ThrowBinaryException3(ResourceLimitError,MemoryAllocationFailed,
UnableToFloodfillImage);
}
- (void) memset(floodplane,False,image->columns*image->rows);
/*
Push initial segment on stack.
*/
start=0;
s=segment_stack;
Push(y,x,x,1);
- Push(y+1,x,x,-1);
+ Push((ptrdiff_t)y+1,x,x,-1);
while (s > segment_stack)
{
/*
{
start=x+1;
if (start < x1)
- Push(y,start,x1-1,-offset);
+ Push(y,start,(ptrdiff_t)x1-1,-offset);
x=x1+1;
}
do
break;
}
}
- Push(y,start,x-1,offset);
- if (x > (x2+1))
- Push(y,x2+1,x-1,-offset);
+ Push(y,start, (ptrdiff_t)x-1,offset);
+ if (x > ((ptrdiff_t)x2+1))
+ Push(y, (ptrdiff_t)x2+1, (ptrdiff_t)x-1,-offset);
}
skip=False;
x++;
start=0;
s=segment_stack;
Push(y,x,x,1);
- Push(y+1,x,x,-1);
+ Push((ptrdiff_t)y+1,x,x,-1);
while (s > segment_stack)
{
/*
{
start=x+1;
if (start < x1)
- Push(y,start,x1-1,-offset);
+ Push(y,start, (ptrdiff_t)x1-1,-offset);
x=x1+1;
}
do
status=MagickFail;
break;
}
- Push(y,start,x-1,offset);
- if (x > (x2+1))
- Push(y,x2+1,x-1,-offset);
+ Push(y,start, (ptrdiff_t)x-1,offset);
+ if (x > ((ptrdiff_t)x2+1))
+ Push(y, (ptrdiff_t)x2+1, (ptrdiff_t)x-1,-offset);
}
skip=False;
q=GetImagePixels(image,0,y,image->columns,1);
if (view_set != (ThreadViewSet *) NULL)
{
- for (i=0; i < view_set->nviews; i++)
+ if (view_set->views != (ViewInfo *) NULL)
{
- CloseCacheView(view_set->views[i]);
- view_set->views[i]=(ViewInfo *) NULL;
+ for (i=0; i < view_set->nviews; i++)
+ {
+ if (view_set->views[i] != (ViewInfo *) NULL)
+ {
+ CloseCacheView(view_set->views[i]);
+ view_set->views[i]=(ViewInfo *) NULL;
+ }
+ }
+ MagickFreeMemory(view_set->views);
}
- MagickFreeMemory(view_set->views);
MagickFreeMemory(view_set);
}
}
return((const PixelPacket *) NULL);
}
offset=y*(magick_off_t) cache_info->columns+x;
- length=(rows-1)*cache_info->columns+columns-1;
+ length=(size_t) (rows-1)*cache_info->columns+columns-1;
number_pixels=(magick_uint64_t) cache_info->columns*cache_info->rows;
if ((offset >= 0) && (((magick_uint64_t) offset+length) < number_pixels))
if ((x >= 0) && ((x+columns) <= cache_info->columns) &&
magick_int64_t
total_pixels;
- total_pixels=image->columns*image->rows;
+ total_pixels=(magick_int64_t) image->columns*image->rows;
if (AcquireMagickResource(PixelsResource,total_pixels)
!= MagickPass)
{
*/
cache_info=(CacheInfo *) image->cache;
status=(((image->storage_class == cache_info->storage_class) &&
- (image->colorspace == cache_info->colorspace)) ||
+ (image->colorspace == cache_info->colorspace) &&
+ (image->rows == cache_info->rows) &&
+ (image->columns == cache_info->columns)) ||
(OpenCache(image,IOMode,exception)));
}
}
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
{
#define AssignImageText "[%s] Assign colors..."
- IndexPacket
- index;
-
- long
- count,
- y;
-
- register IndexPacket
- *indexes;
-
- register long
- i,
- x;
-
- register const NodeInfo
- *node_info;
-
- register PixelPacket
- *q;
-
unsigned int
dither;
unsigned int
- id,
is_grayscale,
is_monochrome;
*/
if (!AllocateImageColormap(image,cube_info->colors))
ThrowBinaryException3(ResourceLimitError,MemoryAllocationFailed,
- UnableToQuantizeImage);
+ UnableToQuantizeImage);
image->colors=0;
is_grayscale=image->is_grayscale;
is_monochrome=image->is_monochrome;
if (dither)
dither=DitherImage(cube_info,image);
if (!dither)
- for (y=0; y < (long) image->rows; y++)
{
- q=GetImagePixels(image,0,y,image->columns,1);
- if (q == (PixelPacket *) NULL)
- {
- status=MagickFail;
- break;
- }
- indexes=AccessMutableIndexes(image);
- for (x=0; x < (long) image->columns; x+=count)
- {
- /*
- Identify the deepest node containing the pixel's color.
- */
- for (count=1; (x+count) < (long) image->columns; count++)
- if (NotColorMatch(q,q+count))
- break;
- node_info=cube_info->root;
- for (index=MaxTreeDepth-1; (long) index > 0; index--)
- {
- id=ColorToNodeId(q->red,q->green,q->blue,index);
- if (node_info->child[id] == (NodeInfo *) NULL)
- break;
- node_info=node_info->child[id];
- }
- /*
- Find closest color among siblings and their children.
- */
- cube_info->color.red=q->red;
- cube_info->color.green=q->green;
- cube_info->color.blue=q->blue;
- cube_info->distance=3.0*((double) MaxRGB+1.0)*((double) MaxRGB+1.0);
- ClosestColor(image,cube_info,node_info->parent);
- index=(IndexPacket) cube_info->color_number;
- for (i=0; i < count; i++)
+ long
+ y;
+
+ /*
+ FIXME: Use OpenMP?
+ */
+ for (y=0; y < (long) image->rows; y++)
{
- if (image->storage_class == PseudoClass)
- indexes[x+i]=index;
- if (!cube_info->quantize_info->measure_error)
+ IndexPacket
+ index;
+
+ long
+ count;
+
+ register IndexPacket
+ *indexes;
+
+ register long
+ i,
+ x;
+
+ register const NodeInfo
+ *node_info;
+
+ register PixelPacket
+ *q;
+
+ unsigned int
+ id;
+
+ q=GetImagePixels(image,0,y,image->columns,1);
+ if (q == (PixelPacket *) NULL)
{
- q->red=image->colormap[index].red;
- q->green=image->colormap[index].green;
- q->blue=image->colormap[index].blue;
+ status=MagickFail;
+ break;
}
- q++;
- }
- }
- if (!SyncImagePixels(image))
- {
- status=MagickFail;
- break;
+ indexes=AccessMutableIndexes(image);
+ for (x=0; x < (long) image->columns; x+=count)
+ {
+ /*
+ Identify the deepest node containing the pixel's color.
+ */
+ for (count=1; (x+count) < (long) image->columns; count++)
+ if (NotColorMatch(q,q+count))
+ break;
+ node_info=cube_info->root;
+ for (index=MaxTreeDepth-1; (long) index > 0; index--)
+ {
+ id=ColorToNodeId(q->red,q->green,q->blue,index);
+ if (node_info->child[id] == (NodeInfo *) NULL)
+ break;
+ node_info=node_info->child[id];
+ }
+ /*
+ Find closest color among siblings and their children.
+ */
+ cube_info->color.red=q->red;
+ cube_info->color.green=q->green;
+ cube_info->color.blue=q->blue;
+ cube_info->distance=3.0*(MaxRGBDouble+1.0)*(MaxRGBDouble+1.0);
+ ClosestColor(image,cube_info,node_info->parent);
+ index=(IndexPacket) cube_info->color_number;
+ for (i=0; i < count; i++)
+ {
+ if (image->storage_class == PseudoClass)
+ indexes[x+i]=index;
+ if (!cube_info->quantize_info->measure_error)
+ {
+ q->red=image->colormap[index].red;
+ q->green=image->colormap[index].green;
+ q->blue=image->colormap[index].blue;
+ }
+ q++;
+ }
+ }
+ if (!SyncImagePixels(image))
+ {
+ status=MagickFail;
+ break;
+ }
+ if (QuantumTick(y,image->rows))
+ if (!MagickMonitorFormatted(y,image->rows,&image->exception,
+ AssignImageText,image->filename))
+ {
+ status=MagickFail;
+ break;
+ }
}
- if (QuantumTick(y,image->rows))
- if (!MagickMonitorFormatted(y,image->rows,&image->exception,
- AssignImageText,image->filename))
- {
- status=MagickFail;
- break;
- }
}
if ((cube_info->quantize_info->number_colors == 2) &&
(IsGrayColorspace(cube_info->quantize_info->colorspace)))
{
+ PixelPacket
+ *q;
+
Quantum
intensity;
+ long
+ i;
+
/*
Monochrome image.
*/
is_monochrome=True;
q=image->colormap;
for (i=(long) image->colors; i > 0; i--)
- {
- intensity=(Quantum) (PixelIntensityToQuantum(q) <
- (MaxRGB/2) ? 0 : MaxRGB);
- q->red=intensity;
- q->green=intensity;
- q->blue=intensity;
- q++;
- }
+ {
+ intensity=(Quantum) (PixelIntensityToQuantum(q) <
+ (MaxRGB/2) ? 0 : MaxRGB);
+ q->red=intensity;
+ q->green=intensity;
+ q->blue=intensity;
+ q++;
+ }
}
if (cube_info->quantize_info->measure_error)
(void) GetImageQuantizeError(image);
if (NotColorMatch(p,p+count))
break;
index=MaxTreeDepth-1;
- bisect=((double) MaxRGB+1.0)/2.0;
- mid.red=MaxRGB/2.0;
- mid.green=MaxRGB/2.0;
- mid.blue=MaxRGB/2.0;
+ bisect=(MaxRGBDouble+1.0)/2.0;
+ mid.red=MaxRGBDouble/2.0;
+ mid.green=MaxRGBDouble/2.0;
+ mid.blue=MaxRGBDouble/2.0;
node_info=cube_info->root;
for (level=1; level <= 8; level++)
{
*/
node_info->child[id]=GetNodeInfo(cube_info,id,level,node_info);
if (node_info->child[id] == (NodeInfo *) NULL)
- ThrowException3(exception,ResourceLimitError,
- MemoryAllocationFailed,UnableToQuantizeImage);
+ {
+ ThrowException3(exception,ResourceLimitError,
+ MemoryAllocationFailed,UnableToQuantizeImage);
+ status=MagickFail;
+ break;
+ }
if (level == MaxTreeDepth)
cube_info->colors++;
}
cube_info->root->quantize_error+=node_info->quantize_error;
index--;
}
+ if (status == MagickFail)
+ break;
/*
Sum RGB for this leaf for later derivation of the mean cube color.
*/
break;
}
}
- if (y == (long) image->rows)
- return(True);
+ if ((status == MagickFail) || (y == (long) image->rows))
+ return status;
/*
More than 256 colors; classify to the cube_info->depth tree depth.
*/
if (NotColorMatch(p,p+count))
break;
index=MaxTreeDepth-1;
- bisect=((double) MaxRGB+1.0)/2.0;
- mid.red=MaxRGB/2.0;
- mid.green=MaxRGB/2.0;
- mid.blue=MaxRGB/2.0;
+ bisect=(MaxRGBDouble+1.0)/2.0;
+ mid.red=MaxRGBDouble/2.0;
+ mid.green=MaxRGBDouble/2.0;
+ mid.blue=MaxRGBDouble/2.0;
node_info=cube_info->root;
for (level=1; level <= cube_info->depth; level++)
{
- bisect/=2;
+ bisect/=2.0;
id=ColorToNodeId(p->red,p->green,p->blue,index);
mid.red+=id & 4 ? bisect : -bisect;
mid.green+=id & 2 ? bisect : -bisect;
*/
node_info->child[id]=GetNodeInfo(cube_info,id,level,node_info);
if (node_info->child[id] == (NodeInfo *) NULL)
- ThrowException3(exception,ResourceLimitError,
- MemoryAllocationFailed,UnableToQuantizeImage);
+ {
+ ThrowException3(exception,ResourceLimitError,
+ MemoryAllocationFailed,UnableToQuantizeImage);
+ status=MagickFail;
+ break;
+ }
if (level == cube_info->depth)
cube_info->colors++;
}
cube_info->root->quantize_error+=node_info->quantize_error;
index--;
}
+ if (status == MagickFail)
+ break;
/*
Sum RGB for this leaf for later derivation of the mean cube color.
*/
% ClosestColor() traverses the color cube tree at a particular node and
% determines which colormap entry best represents the input color.
%
+% This is a recursive function.
+%
% The format of the ClosestColor method is:
%
% void ClosestColor(Image *image,CubeInfo *cube_info,
p->color.red=pixel.red;
p->color.green=pixel.green;
p->color.blue=pixel.blue;
- p->distance=3.0*((double) MaxRGB+1.0)*((double) MaxRGB+1.0);
+ p->distance=3.0*(MaxRGBDouble+1.0)*(MaxRGBDouble+1.0);
ClosestColor(image,p,node_info->parent);
p->cache[i]=(long) p->color_number;
}
for (i=0; i < ExceptionQueueLength; i++)
{
cube_info->weights[ExceptionQueueLength-i-1]=1.0/weight;
- weight*=exp(log(((double) MaxRGB+1.0))/(ExceptionQueueLength-1.0));
+ weight*=exp(log((MaxRGBDouble+1.0))/(ExceptionQueueLength-1.0));
}
/*
Normalize the weighting factors.
/*
Compute final error statistics.
*/
- normalize=3.0*((double) MaxRGB+1.0)*((double) MaxRGB+1.0);
+ normalize=3.0*(MaxRGBDouble+1.0)*(MaxRGBDouble+1.0);
image->error.mean_error_per_pixel=total_error/image->columns/image->rows;
image->error.normalized_mean_error=
image->error.mean_error_per_pixel/normalize;
% coherence between neighboring pixels. Here, the quantization error is
% distributed along the Hilbert curve.
%
+% This is a recursive function.
+%
% The format of the HilbertCurve method is:
%
% void HilbertCurve(CubeInfo *cube_info,Image *image,
{ 168, 104, 152, 88, 164, 100, 148, 84 }
};
- IndexPacket
- index;
-
long
y;
- register IndexPacket
- *indexes;
-
- register long
- x;
-
- register PixelPacket
- *q;
-
MagickPassFail
status=MagickPass;
UnableToDitherImage);
/*
Dither image with the ordered dithering technique.
+ FIXME: Use OpenMP?
*/
for (y=0; y < (long) image->rows; y++)
{
+ IndexPacket
+ index;
+
+ register IndexPacket
+ *indexes;
+
+ register long
+ x;
+
+ register PixelPacket
+ *q;
+
q=GetImagePixels(image,0,y,image->columns,1);
if (q == (PixelPacket *) NULL)
{
% PruneChild() deletes the given node and merges its statistics into its
% parent.
%
+% This is a recursive function.
+%
% The format of the PruneSubtree method is:
%
% PruneChild(CubeInfo *cube_info,const NodeInfo *node_info)
% PruneLevel() deletes all nodes at the bottom level of the color tree merging
% their color statistics into their parent node.
%
+% This is a recursive function.
+%
% The format of the PruneLevel method is:
%
% PruneLevel(CubeInfo *cube_info,const NodeInfo *node_info)
% cube_info->depth while merging their color statistics into their parent
% node.
%
+% This is a recursive function.
+%
% The format of the PruneToCubeDepth method is:
%
% PruneToCubeDepth(CubeInfo *cube_info,const NodeInfo *node_info)
% Reduce() traverses the color cube tree and prunes any node whose
% quantization error falls below a particular threshold.
%
+% This is a recursive function.
+%
% The format of the Reduce method is:
%
% Reduce(CubeInfo *cube_info,const NodeInfo *node_info)
cube_info->colors=0;
Reduce(cube_info,cube_info->root);
status=MagickMonitorFormatted(span-cube_info->colors,
- span-number_colors+1,exception,
+ (size_t) span-number_colors+1,exception,
ReduceImageText,
filename,
number_colors);
Currently based on George Marsaglia's multiply-with-carry generator.
This is a k=2 generator with a period >2^60.
*/
-#ifndef _MAGICK_RANDOM_PRIVATE_H
-#define _MAGICK_RANDOM_PRIVATE_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif /* defined(__cplusplus) || defined(c_plusplus) */
+/*
+ Initialize the random kernel with suitable entropy
+*/
+MagickExport void InitializeMagickRandomKernel(MagickRandomKernel *kernel);
+
+/*
+ Acquire the default random number kernel. Memory is owned by
+ library and should not be freed.
+*/
+MagickExport MagickRandomKernel* AcquireMagickRandomKernel();
-#if defined(MAGICK_IMPLEMENTATION)
+/*
+ Initialize the random number generator system.
+*/
+extern void InitializeMagickRandomGenerator();
-#include "magick/random.h"
+/*
+ Destroy the random number generator system.
+*/
+extern void DestroyMagickRandomGenerator();
- /*
- You may replace the following two constants MAGICK_RANDOM_ZC and
- MAGICK_RANDOM_WC by any pair of distinct constants from this list:
+/*
+ You may replace the following two constants MAGICK_RANDOM_ZC and
+ MAGICK_RANDOM_WC by any pair of distinct constants from this list:
- 18000 18030 18273 18513 18879 19074 19098 19164 19215 19584
- 19599 19950 20088 20508 20544 20664 20814 20970 21153 21243
- 21423 21723 21954 22125 22188 22293 22860 22938 22965 22974
- 23109 23124 23163 23208 23508 23520 23553 23658 23865 24114
- 24219 24660 24699 24864 24948 25023 25308 25443 26004 26088
- 26154 26550 26679 26838 27183 27258 27753 27795 27810 27834
- 27960 28320 28380 28689 28710 28794 28854 28959 28980 29013
- 29379 29889 30135 30345 30459 30714 30903 30963 31059 31083
+ 18000 18030 18273 18513 18879 19074 19098 19164 19215 19584
+ 19599 19950 20088 20508 20544 20664 20814 20970 21153 21243
+ 21423 21723 21954 22125 22188 22293 22860 22938 22965 22974
+ 23109 23124 23163 23208 23508 23520 23553 23658 23865 24114
+ 24219 24660 24699 24864 24948 25023 25308 25443 26004 26088
+ 26154 26550 26679 26838 27183 27258 27753 27795 27810 27834
+ 27960 28320 28380 28689 28710 28794 28854 28959 28980 29013
+ 29379 29889 30135 30345 30459 30714 30903 30963 31059 31083
- (or any other 16-bit constants k for which both k*2^16-1 and
- k*2^15-1 are prime).
- */
+ (or any other 16-bit constants k for which both k*2^16-1 and
+ k*2^15-1 are prime).
+*/
#define MAGICK_RANDOM_ZC 36969
#define MAGICK_RANDOM_WC 18000
- /*
- Generate a random integer value
- */
- static inline magick_uint32_t MagickRandomIntegerInlined(MagickRandomKernel *kernel)
- {
- kernel->z = MAGICK_RANDOM_ZC * (kernel->z & 65535U) + (kernel->z >> 16U);
- kernel->w = MAGICK_RANDOM_WC * (kernel->w & 65535U) + (kernel->w >> 16U);
- return (kernel->z << 16U) + (kernel->w & 65535U);
- }
-
- /*
- Generate a random double value (0.0 to 1.0)
- */
- static inline double MagickRandomRealInlined(MagickRandomKernel *kernel)
- {
- double result = MagickRandomIntegerInlined(kernel) * 2.3283064370807974e-10;
- if (result > 1.0)
- result=1.0;
- return result;
- }
-
-#endif /* defined(MAGICK_IMPLEMENTATION) */
-
-#if defined(__cplusplus) || defined(c_plusplus)
+/*
+ Generate a random integer value
+*/
+static MAGICK_FUNC_ALWAYSINLINE inline magick_uint32_t MagickRandomIntegerInlined(MagickRandomKernel *kernel)
+{
+ kernel->z = MAGICK_RANDOM_ZC * (kernel->z & 65535U) + (kernel->z >> 16U);
+ kernel->w = MAGICK_RANDOM_WC * (kernel->w & 65535U) + (kernel->w >> 16U);
+ return (kernel->z << 16U) + (kernel->w & 65535U);
}
-#endif /* defined(__cplusplus) || defined(c_plusplus) */
-#endif /* ifndef _MAGICK_RANDOM_PRIVATE_H */
+/*
+ Generate a random double value (0.0 to 1.0)
+*/
+static MAGICK_FUNC_ALWAYSINLINE inline double MagickRandomRealInlined(MagickRandomKernel *kernel)
+{
+ double result = MagickRandomIntegerInlined(kernel) * 2.3283064370807974e-10;
+ if (result > 1.0)
+ result=1.0;
+ return result;
+}
/*
* Local Variables:
*/
#include "magick/studio.h"
-#include "magick/random-private.h"
#include "magick/random.h"
#include "magick/semaphore.h"
#include "magick/tsd.h"
MagickExport double MagickRandomReal(void);
#if defined(MAGICK_IMPLEMENTATION)
-
- /*
- Initialize the random kernel with suitable entropy
- */
- MagickExport void InitializeMagickRandomKernel(MagickRandomKernel *kernel);
-
- /*
- Acquire the default random number kernel. Memory is owned by
- library and should not be freed.
- */
- MagickExport MagickRandomKernel* AcquireMagickRandomKernel();
-
- /*
- Initialize the random number generator system.
- */
- extern void InitializeMagickRandomGenerator();
-
- /*
- Destroy the random number generator system.
- */
- extern void DestroyMagickRandomGenerator();
-
+#include "magick/random-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003-2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Magick registry methods.
+*/
+
+extern void
+ DestroyMagickRegistry(void),
+ InitializeMagickRegistry(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003-2009 GraphicsMagick Group
+ Copyright (C) 2003-2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
ExceptionInfo *exception);
#if defined(MAGICK_IMPLEMENTATION)
-
-extern void
- DestroyMagickRegistry(void),
- InitializeMagickRegistry(void);
-
+# include "magick/registry-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Drawing methods.
+*/
+
+typedef struct _ElementInfo
+{
+ double
+ cx,
+ cy,
+ major,
+ minor,
+ angle;
+} ElementInfo;
+
+typedef struct _PrimitiveInfo
+{
+ PointInfo
+ point;
+
+ size_t
+ coordinates;
+
+ PrimitiveType
+ primitive;
+
+ PaintMethod
+ method;
+
+ char
+ *text;
+
+ /*
+ "flags" indicates:
+
+ bit 0: shape/subpath is closed (e.g., rectangle, path with 'z' or 'Z')
+
+ Macro arg "pi" is a PrimitiveInfo *.
+ Macro arg "zero_or_one" should be 0 (turn off) or 1 (turn on).
+ */
+ unsigned long
+ flags;
+#define PRIMINF_CLEAR_FLAGS(pi) ((pi)->flags=0)
+#define PRIMINF_GET_IS_CLOSED_SUBPATH(pi) ((MagickBool)((pi)->flags&1U))
+#define PRIMINF_SET_IS_CLOSED_SUBPATH(pi,zero_or_one) ((pi)->flags=((pi)->flags&(~1U))|(unsigned long)zero_or_one)
+} PrimitiveInfo;
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
PointInfo
*points;
+ size_t
+ highwater,
+ number_points;
+
long
- number_points,
- direction,
- highwater;
+ direction;
MagickBool
ghostline;
EdgeInfo
*edges;
- long
+ size_t
number_edges;
} PolygonInfo;
TraceArc(PrimitiveInfoMgr *,const PointInfo,const PointInfo,const PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
TraceArcPath(PrimitiveInfoMgr *,const PointInfo,const PointInfo,const PointInfo,
const double,const unsigned int,const unsigned int) MAGICK_FUNC_WARN_UNUSED_RESULT,
- TraceBezier(PrimitiveInfoMgr *,const unsigned long) MAGICK_FUNC_WARN_UNUSED_RESULT,
+ TraceBezier(PrimitiveInfoMgr *,const size_t) MAGICK_FUNC_WARN_UNUSED_RESULT,
TraceCircle(PrimitiveInfoMgr *,const PointInfo,const PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
TraceEllipse(PrimitiveInfoMgr *,const PointInfo,const PointInfo,const PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
TraceLine(PrimitiveInfo *,const PointInfo,const PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
- TracePath(Image *image,PrimitiveInfoMgr *p_PIMgr,const char *path,unsigned long *number_coordinates),
+ TracePath(Image *image,PrimitiveInfoMgr *p_PIMgr,const char *path,size_t *number_coordinates),
TracePoint(PrimitiveInfo *,const PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
TraceRectangle(PrimitiveInfo *,const PointInfo,const PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
TraceRoundRectangle(PrimitiveInfoMgr *,const PointInfo,const PointInfo,PointInfo) MAGICK_FUNC_WARN_UNUSED_RESULT,
for (x=0; draw_info->dash_pattern[x] != 0.0; x++);
clone_info->dash_pattern=
- MagickAllocateArray(double *,(x+1),sizeof(double));
+ MagickAllocateArray(double *,((size_t) x+1),sizeof(double));
if (clone_info->dash_pattern == (double *) NULL)
MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed,
UnableToAllocateDashPattern);
(void) memcpy(clone_info->dash_pattern,draw_info->dash_pattern,
- (x+1)*sizeof(double));
+ ((size_t) x+1)*sizeof(double));
}
if (draw_info->extra->clip_path != (char *) NULL)
clone_info->extra->clip_path=AllocateString(draw_info->extra->clip_path);
register EdgeInfo
*p;
- register long
- i,
+ size_t
+ i;
+
+ register size_t
j;
(void) LogMagickEvent(RenderEvent,GetMagickModule()," begin active-edge");
p=polygon_info->edges;
for (i=0; i < polygon_info->number_edges; i++)
{
- (void) LogMagickEvent(RenderEvent,GetMagickModule()," edge %lu:",i);
+ (void) LogMagickEvent(RenderEvent,GetMagickModule()," edge %"MAGICK_SIZE_T_F"u:",(MAGICK_SIZE_T) i);
(void) LogMagickEvent(RenderEvent,GetMagickModule()," direction: %s",
p->direction ? "down" : "up");
(void) LogMagickEvent(RenderEvent,GetMagickModule()," ghostline: %s",
}
static void
-ReversePoints(PointInfo *points,const int number_points)
+ReversePoints(PointInfo *points,const size_t number_points)
{
PointInfo
point;
- register long
+ register size_t
i;
for (i=0; i < (number_points >> 1); i++)
static PolygonInfo *
ConvertPathToPolygon(const PathInfo *path_info)
{
- long
- direction,
+ size_t
edge,
- next_direction,
number_edges,
number_points;
+ long
+ direction,
+ next_direction;
+
PointInfo
point,
*points;
SegmentInfo
bounds;
- register long
- i,
+ register unsigned long
n;
+ register long
+ i;
+
MagickBool
ghostline;
%
% The format of the DestroyEdge method is:
%
-% long DestroyEdge(PolygonInfo *polygon_info,const int edge)
+% size_t DestroyEdge(PolygonInfo *polygon_info,const size_t edge)
%
% A description of each parameter follows:
%
%
%
*/
-static long
-DestroyEdge(PolygonInfo * restrict polygon_info,const long edge)
+static size_t
+DestroyEdge(PolygonInfo * restrict polygon_info,const size_t edge)
{
- assert(edge >= 0);
assert(edge < polygon_info->number_edges);
MagickFreeMemory(polygon_info->edges[edge].points);
polygon_info->number_edges--;
if (polygon_info != (PolygonInfo *) NULL)
{
- register long
+ register size_t
i;
- for (i=0; i < polygon_info->number_edges; i++)
- MagickFreeMemory(polygon_info->edges[i].points);
- MagickFreeMemory(polygon_info->edges);
+ if (polygon_info->edges != (EdgeInfo *) NULL)
+ {
+ for (i=0; i < polygon_info->number_edges; i++)
+ MagickFreeMemory(polygon_info->edges[i].points);
+ MagickFreeMemory(polygon_info->edges);
+ }
MagickFreeMemory(polygon_info);
}
}
# pragma omp flush (row_count)
#endif
thread_row_count=row_count;
- if (QuantumTick(thread_row_count,y_max-y_min+1))
- if (!MagickMonitorFormatted(thread_row_count,y_max-y_min+1,&image->exception,
+ if (QuantumTick(thread_row_count,((size_t) y_max-(size_t) y_min)+1))
+ if (!MagickMonitorFormatted(thread_row_count,((size_t) y_max- (size_t) y_min)+1,&image->exception,
AffineDrawImageText,image->filename))
thread_status=MagickFail;
}
PrimitiveInfo
primitive_info[6];
- register long
+ register size_t
i;
SegmentInfo
register char
*p;
+ size_t
+ i;
+
register long
- i,
x;
SegmentInfo
*/
gradient_width=Max(AbsoluteValue(bounds.x2-bounds.x1+1),1);
gradient_height=Max(AbsoluteValue(bounds.y2-bounds.y1+1),1);
- {
- char resource_str[MaxTextExtent];
- const magick_int64_t width_resource_limit = GetMagickResourceLimit(WidthResource);
- const magick_int64_t hight_resource_limit = GetMagickResourceLimit(HeightResource);
- const magick_int64_t pixels_resource_limit = GetMagickResourceLimit(PixelsResource);
- if (gradient_width > width_resource_limit)
- {
- FormatString(resource_str,"%" MAGICK_INT64_F "d", width_resource_limit);
- ThrowException(&image->exception,ResourceLimitError,
- ImagePixelWidthLimitExceeded,resource_str);
- status=MagickFail;
- break;
- }
- if (gradient_height > hight_resource_limit)
- {
- FormatString(resource_str,"%" MAGICK_INT64_F "d", hight_resource_limit);
- ThrowException(&image->exception,ResourceLimitError,
- ImagePixelHeightLimitExceeded,resource_str);
- status=MagickFail;
- break;
- }
- if (gradient_width*gradient_height > pixels_resource_limit)
- {
- FormatString(resource_str,"%" MAGICK_INT64_F "d", pixels_resource_limit);
- ThrowException(&image->exception,ResourceLimitError,
- ImagePixelLimitExceeded,resource_str);
- status=MagickFail;
- break;
+ if (AcquireMagickResource(WidthResource,gradient_width) != MagickPass)
+ {
+ char resource_str[MaxTextExtent];
+ const magick_int64_t width_resource_limit = GetMagickResourceLimit(WidthResource);
+ FormatString(resource_str,"%" MAGICK_INT64_F "d", width_resource_limit);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelWidthLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
+ if (AcquireMagickResource(HeightResource,gradient_height) != MagickPass)
+ {
+ char resource_str[MaxTextExtent];
+ const magick_int64_t hight_resource_limit = GetMagickResourceLimit(HeightResource);
+ FormatString(resource_str,"%" MAGICK_INT64_F "d", hight_resource_limit);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelHeightLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
}
- }
+ if (AcquireMagickResource(PixelsResource,(magick_uint64_t) gradient_width*gradient_height)
+ != MagickPass)
+ {
+ char resource_str[MaxTextExtent];
+ const magick_int64_t pixels_resource_limit = GetMagickResourceLimit(PixelsResource);
+ FormatString(resource_str,"%" MAGICK_INT64_F "d", pixels_resource_limit);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
/*
Apply an arbitrary limit to gradient size requests
since gradient images can take a lot of memory.
Some tiny SVGs request huge gradients. This is here
to avoid denial of service.
*/
- if (gradient_width*gradient_height > 5000*5000 /*10000*10000*/)
+ if (gradient_width*gradient_height > (double) 5000*5000 /*10000*10000*/)
{
char gradient_size_str[MaxTextExtent];
FormatString(gradient_size_str,"%gx%g",
if (LocaleCompare("pattern",token) == 0)
{
double
- ordinate;
+ ordinate,
+ dval;
+
RectangleInfo
bounds;
status=MagickFail;
break;
}
- bounds.x=(long) ceil(ordinate-0.5);
+ dval=ceil(ordinate-0.5);
+ if (((dval < (double) LONG_MIN || dval > (double) LONG_MAX)) ||
+ (AcquireMagickResource(WidthResource,AbsoluteValue((magick_int64_t) dval)) != MagickPass))
+ {
+ char resource_str[MaxTextExtent];
+ FormatString(resource_str,"pattern x ordinate (%g)", ordinate);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelWidthLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
+ bounds.x=(long) dval;
MagickGetToken(q,&q,token,token_max_length);
if (*token == ',')
MagickGetToken(q,&q,token,token_max_length);
status=MagickFail;
break;
}
- bounds.y=(long) ceil(ordinate-0.5);
+ dval=ceil(ordinate-0.5);
+ if ((dval < (double) LONG_MIN || dval > (double) LONG_MAX) ||
+ (AcquireMagickResource(WidthResource,AbsoluteValue((magick_int64_t) dval)) != MagickPass))
+ {
+ char resource_str[MaxTextExtent];
+ FormatString(resource_str,"pattern x ordinate (%g)", ordinate);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelHeightLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
+ bounds.y=(long) dval;
MagickGetToken(q,&q,token,token_max_length);
if (*token == ',')
MagickGetToken(q,&q,token,token_max_length);
status=MagickFail;
break;
}
- bounds.width=(unsigned long) floor(ordinate+0.5);
+ dval=floor(ordinate+0.5);
+ if ((dval > (double) LONG_MAX) ||
+ (AcquireMagickResource(WidthResource,(magick_int64_t) dval) != MagickPass))
+ {
+ char resource_str[MaxTextExtent];
+ FormatString(resource_str,"pattern width (%g)", ordinate);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelWidthLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
+ bounds.width=(unsigned long) dval;
MagickGetToken(q,&q,token,token_max_length);
if (*token == ',')
MagickGetToken(q,&q,token,token_max_length);
status=MagickFail;
break;
}
- bounds.height=(unsigned long) floor(ordinate+0.5);
+ dval=floor(ordinate+0.5);
+ if ((dval > (double) LONG_MAX) ||
+ (AcquireMagickResource(WidthResource,(magick_int64_t) dval) != MagickPass))
+ {
+ char resource_str[MaxTextExtent];
+ FormatString(resource_str,"pattern height (%g)", ordinate);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelHeightLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
+ bounds.height=(unsigned long) dval;
+ if (AcquireMagickResource(PixelsResource,(magick_uint64_t) bounds.width*bounds.height)
+ != MagickPass)
+ {
+ char resource_str[MaxTextExtent];
+ FormatString(resource_str,"pattern dimensions %lux%lu", bounds.width,bounds.height);
+ ThrowException(&image->exception,ResourceLimitError,
+ ImagePixelLimitExceeded,resource_str);
+ status=MagickFail;
+ break;
+ }
for (p=q; *q != '\0'; )
{
MagickGetToken(q,&q,token,token_max_length);
{
n++;
MagickReallocMemory(DrawInfo **,graphic_context,
- MagickArraySize((n+1),sizeof(DrawInfo *)));
+ MagickArraySize(((size_t) n+1),sizeof(DrawInfo *)));
if (graphic_context == (DrawInfo **) NULL)
{
ThrowException3(&image->exception,ResourceLimitError,
MagickGetToken(p,&p,token,token_max_length);
}
graphic_context[n]->dash_pattern=
- MagickAllocateClearedArray(double *,(2*x+2),sizeof(double));
+ MagickAllocateClearedArray(double *,((size_t) 2*x+2),sizeof(double));
if (graphic_context[n]->dash_pattern == (double *) NULL)
{
status=MagickFail;
{/*textdx*/
double value;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&value);
+ status &= MagickAtoFChk(token,&value);
/* value may be specified using "em" or "ex" units */
if (LocaleNCompare(q,"em",2) == 0)
{
{/*textdy*/
double value;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&value);
+ status &= MagickAtoFChk(token,&value);
/* value may be specified using "em" or "ex" units */
if (LocaleNCompare(q,"em",2) == 0)
{
{
double value;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&value);
+ status &= MagickAtoFChk(token,&value);
xTextCurrent = value;
break;
}
{
double value;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&value);
+ status &= MagickAtoFChk(token,&value);
yTextCurrent = value;
break;
}
if (LocaleCompare("translate",keyword) == 0)
{
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&affine.tx);
+ status &= MagickAtoFChk(token,&affine.tx);
MagickGetToken(q,&q,token,token_max_length);
if (*token == ',')
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&affine.ty);
+ status &= MagickAtoFChk(token,&affine.ty);
break;
}
status=MagickFail;
if (!IsPoint(q))
break;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&point.x);
+ status &= MagickAtoFChk(token,&point.x);
MagickGetToken(q,&q,token,token_max_length);
if (*token == ',')
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&point.y);
+ status &= MagickAtoFChk(token,&point.y);
MagickGetToken(q,(char **) NULL,token,token_max_length);
if (*token == ',')
MagickGetToken(q,&q,token,token_max_length);
- assert(i < (long) number_points);
+ assert(i < number_points);
primitive_info[i].primitive=primitive_type;
primitive_info[i].point=point;
primitive_info[i].coordinates=0;
PRIMINF_CLEAR_FLAGS(&primitive_info[i]);
i++;
PIMgr.StoreStartingAt = i;
- if (i < (long) number_points)
+ if (i < number_points)
continue;
/* Array is full; double the array size */
if ((status=PrimitiveInfoRealloc(&PIMgr,number_points)) == MagickFail)
alpha=bounds.x2-bounds.x1;
beta=bounds.y2-bounds.y1;
radius=hypot(alpha,beta);
- points_length=2*(ceil(MagickPI*radius))+6*BezierQuantum+360;
+ points_length=2.0*(ceil(MagickPI*radius))+6.0*BezierQuantum+360.0;
break;
}
default:
}
case PathPrimitive:
{
- unsigned long number_coordinates=0;
+ size_t number_coordinates=0;
PIMgr.StoreStartingAt=j;
if ((status &= TracePath(image,&PIMgr,token, &number_coordinates)) != MagickPass)
break;
(void) LogMagickEvent(RenderEvent,GetMagickModule()," %.*s",(int) (q-p),p);
if (status == MagickFail)
break;
- assert(i < (long) number_points);
+ assert(i < number_points);
primitive_info[i].primitive=UndefinedPrimitive;
if (i == 0)
continue;
register const PointInfo
*q;
- register long
+ register size_t
i;
- long
+ size_t
j;
/*
const PolygonInfo
* restrict polygon_info;
- register long
+ register size_t
i;
polygon_info=(const PolygonInfo *) AccessThreadViewData(polygon_set);
status&=DrawPolygonPrimitive(image,clone_info,primitive_info);
DestroyDrawInfo(clone_info);
/* ... and then stroke the polygon */
- status&=DrawStrokePolygon(image,draw_info,primitive_info);
+ if (status != MagickFail)
+ status&=DrawStrokePolygon(image,draw_info,primitive_info);
break;
}
status&=DrawPolygonPrimitive(image,draw_info,primitive_info);
p=primitive_info;
for (i=0; i < (long) arc_segments; i++)
{
- beta=0.5*((alpha+(i+1)*theta/arc_segments)-(alpha+i*theta/arc_segments));
+ beta=0.5*((alpha+((double) i+1)*theta/arc_segments)-(alpha+(double) i*theta/arc_segments));
gamma=(8.0/3.0)*sin(fmod(0.5*beta,DegreesToRadians(360.0)))*
sin(fmod(0.5*beta,DegreesToRadians(360.0)))/
sin(fmod(beta,DegreesToRadians(360.0)));
sin(fmod(alpha+i*theta/arc_segments,DegreesToRadians(360.0)))+gamma*
cos(fmod(alpha+i*theta/arc_segments,DegreesToRadians(360.0)));
points[2].x=center.x+
- cos(fmod(alpha+(i+1)*theta/arc_segments,DegreesToRadians(360.0)));
+ cos(fmod(alpha+((double) i+1)*theta/arc_segments,DegreesToRadians(360.0)));
points[2].y=center.y+
- sin(fmod(alpha+(i+1)*theta/arc_segments,DegreesToRadians(360.0)));
+ sin(fmod(alpha+((double) i+1)*theta/arc_segments,DegreesToRadians(360.0)));
points[1].x=points[2].x+gamma*
- sin(fmod(alpha+(i+1)*theta/arc_segments,DegreesToRadians(360.0)));
+ sin(fmod(alpha+((double) i+1)*theta/arc_segments,DegreesToRadians(360.0)));
points[1].y=points[2].y-gamma*
- cos(fmod(alpha+(i+1)*theta/arc_segments,DegreesToRadians(360.0)));
+ cos(fmod(alpha+((double) i+1)*theta/arc_segments,DegreesToRadians(360.0)));
p->point.x=(p == primitive_info) ? start.x : (p-1)->point.x;
p->point.y=(p == primitive_info) ? start.y : (p-1)->point.y;
(p+1)->point.x=cosine*radii.x*points[0].x-sine*radii.y*points[0].y;
static MagickPassFail
TraceBezier(PrimitiveInfoMgr *p_PIMgr,
- const unsigned long number_coordinates)
+ const size_t number_coordinates)
{
double
alpha,
register PrimitiveInfo
*p;
- register unsigned long
+ register size_t
i,
j;
size_t
- control_points;
-
- unsigned long
+ control_points,
quantum;
MagickPassFail
goto trace_bezier_done;
}
if (alpha > quantum)
- quantum=(unsigned long) alpha;
+ quantum=(size_t) alpha;
alpha=fabs(primitive_info[j].point.y-primitive_info[i].point.y);
if (alpha > (double) INT_MAX)
{
goto trace_bezier_done;
}
if (alpha > quantum)
- quantum=(unsigned long) alpha;
+ quantum=(size_t) alpha;
}
}
quantum=Min(quantum/number_coordinates,BezierQuantum);
end=primitive_info[number_coordinates-1].point;
weight=0.0;
for (i=0; i < number_coordinates; i++)
- coefficients[i]=Permutate(number_coordinates-1,i);
+ coefficients[i]=(long) Permutate((long) (number_coordinates-1),(long) i);
for (i=0; i < control_points; i++)
{
p=primitive_info;
static MagickPassFail
-TracePath(Image *image,PrimitiveInfoMgr *p_PIMgr,const char *path,unsigned long *number_coordinates)
+TracePath(Image *image,PrimitiveInfoMgr *p_PIMgr,const char *path,size_t *number_coordinates)
{
char
token[MaxTextExtent];
register long
i;
- unsigned long
+ size_t
arc_segments,
max_strokes_p,
max_strokes_q,
max_strokes_extra,
+ n,
number_vertices;
unsigned long
j,
- n,
p,
q;
/* moved path_p and path_q mem alloc to later since we might not need them */
polygon_primitive=
- MagickAllocateArray(PrimitiveInfo *,(number_vertices+2),
+ MagickAllocateArray(PrimitiveInfo *,((size_t) number_vertices+2),
sizeof(PrimitiveInfo));
if (polygon_primitive == (PrimitiveInfo *) NULL)
{
/*
Allocate paths.
*/
- path_p=MagickAllocateArray(PointInfo *,max_strokes_p+max_strokes_extra,sizeof(PointInfo));
+ path_p=MagickAllocateArray(PointInfo *,(size_t) max_strokes_p+max_strokes_extra,sizeof(PointInfo));
if (path_p == (PointInfo *) NULL)
{
MagickFreeMemory(polygon_primitive);
return((PrimitiveInfo *) NULL);
}
- path_q=MagickAllocateArray(PointInfo *,max_strokes_q+max_strokes_extra,sizeof(PointInfo));
+ path_q=MagickAllocateArray(PointInfo *,(size_t) max_strokes_q+max_strokes_extra,sizeof(PointInfo));
if (path_q == (PointInfo *) NULL)
{
MagickFreeMemory(path_p);
stroke_width_limited = draw_info->stroke_width;
mid=ExpandAffine(&draw_info->affine)*stroke_width_limited/2.0;
- miterlimit=draw_info->miterlimit*draw_info->miterlimit*mid*mid;
- if ((draw_info->linecap == SquareCap) && !closed_path)
+ miterlimit=(double) draw_info->miterlimit*draw_info->miterlimit*mid*mid;
+ if (((draw_info->linecap == SquareCap) && !closed_path) ||
+ (number_vertices != (size_t) ((long) number_vertices)))
{
- if ((status=TraceSquareLinecap(polygon_primitive,number_vertices,mid)) == MagickFail)
+ if ((status=TraceSquareLinecap(polygon_primitive,(long) number_vertices,mid)) == MagickFail)
goto trace_stroke_polygon_done;
}
offset.x=sqrt(mid*mid/(inverse_slope.p*inverse_slope.p+1.0));
if (p >= max_strokes_p)
{/*p pointing into extra; time to realloc*/
max_strokes_p+=max_strokes_extra;
- MagickReallocMemory(PointInfo *,path_p,MagickArraySize(max_strokes_p+max_strokes_extra,sizeof(PointInfo)));
+ MagickReallocMemory(PointInfo *,path_p,MagickArraySize((size_t) max_strokes_p+max_strokes_extra,sizeof(PointInfo)));
if (path_p == (PointInfo *) NULL)
{
MagickFreeMemory(path_p);
if (q >= max_strokes_q)
{/*q pointing into extra; time to realloc*/
max_strokes_q+=max_strokes_extra;
- MagickReallocMemory(PointInfo *,path_q,MagickArraySize(max_strokes_q+max_strokes_extra,sizeof(PointInfo)));
+ MagickReallocMemory(PointInfo *,path_q,MagickArraySize((size_t) max_strokes_q+max_strokes_extra,sizeof(PointInfo)));
if (path_q == (PointInfo *) NULL)
{
MagickFreeMemory(path_p);
if ( (q+arc_segments) >= max_strokes_q )
{/*q+arc_segments will point into extra; time to realloc*/
max_strokes_q+=arc_segments+max_strokes_extra;
- MagickReallocMemory(PointInfo *,path_q,MagickArraySize(max_strokes_q+max_strokes_extra,sizeof(PointInfo)));
+ MagickReallocMemory(PointInfo *,path_q,MagickArraySize((size_t) max_strokes_q+max_strokes_extra,sizeof(PointInfo)));
if (path_q == (PointInfo *) NULL)
{
MagickFreeMemory(path_p);
if ( (p+arc_segments) >= max_strokes_p )
{/*p+arc_segments will point into extra; time to realloc*/
max_strokes_p+=arc_segments+max_strokes_extra;
- MagickReallocMemory(PointInfo *,path_p,MagickArraySize(max_strokes_p+max_strokes_extra,sizeof(PointInfo)));
+ MagickReallocMemory(PointInfo *,path_p,MagickArraySize((size_t) max_strokes_p+max_strokes_extra,sizeof(PointInfo)));
if (path_p == (PointInfo *) NULL)
{
MagickFreeMemory(path_p);
Trace stroked polygon.
*/
stroke_polygon=
- MagickAllocateArray(PrimitiveInfo *,(p+q+2*closed_path+2),
+ MagickAllocateArray(PrimitiveInfo *,MagickArraySize((size_t) p+q+2,(size_t) closed_path+2),
sizeof(PrimitiveInfo));
if (stroke_polygon != (PrimitiveInfo *) NULL)
{
stroke_polygon[i].point=stroke_polygon[0].point;
i++;
stroke_polygon[i].primitive=UndefinedPrimitive;
- stroke_polygon[0].coordinates=p+q+2*closed_path+1;
+ stroke_polygon[0].coordinates=(size_t) p+q+(size_t) 2*closed_path+1;
}
trace_stroke_polygon_done:;
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
signature;
} DrawInfo;
-#if defined(MAGICK_IMPLEMENTATION)
-
-typedef struct _ElementInfo
-{
- double
- cx,
- cy,
- major,
- minor,
- angle;
-} ElementInfo;
-
-#endif /* if defined(MAGICK_IMPLEMENTATION) */
-
typedef struct _PointInfo
{
double
} PointInfo;
#if defined(MAGICK_IMPLEMENTATION)
-
-typedef struct _PrimitiveInfo
-{
- PointInfo
- point;
-
- unsigned long
- coordinates;
-
- PrimitiveType
- primitive;
-
- PaintMethod
- method;
-
- char
- *text;
-
- /*
- "flags" indicates:
-
- bit 0: shape/subpath is closed (e.g., rectangle, path with 'z' or 'Z')
-
- Macro arg "pi" is a PrimitiveInfo *.
- Macro arg "zero_or_one" should be 0 (turn off) or 1 (turn on).
- */
- unsigned long
- flags;
-#define PRIMINF_CLEAR_FLAGS(pi) ((pi)->flags=0)
-#define PRIMINF_GET_IS_CLOSED_SUBPATH(pi) ((MagickBool)((pi)->flags&1U))
-#define PRIMINF_SET_IS_CLOSED_SUBPATH(pi,zero_or_one) ((pi)->flags=((pi)->flags&(~1U))|(unsigned long)zero_or_one)
-} PrimitiveInfo;
-
+# include "magick/render-private.h"
#endif /* if defined(MAGICK_IMPLEMENTATION) */
typedef struct _TypeMetric
if (q == (PixelPacket *) NULL)
break;
p=scanline+image->columns-1;
- q+=2*(image->columns-1);
+ q+=2*((size_t) image->columns-1);
*q=(*p);
*(q+1)=(*(p));
for (x=1; x < (long) image->columns; x++)
total=zero;
r=p;
Minify(3.0); Minify(7.0); Minify(7.0); Minify(3.0);
- r=p+(image->columns+4);
+ r=p+((size_t) image->columns+4);
Minify(7.0); Minify(15.0); Minify(15.0); Minify(7.0);
- r=p+2*(image->columns+4);
+ r=p+2*((size_t) image->columns+4);
Minify(7.0); Minify(15.0); Minify(15.0); Minify(7.0);
- r=p+3*(image->columns+4);
+ r=p+3*((size_t) image->columns+4);
Minify(3.0); Minify(7.0); Minify(7.0); Minify(3.0);
q->red=(Quantum) (total.red/128.0+0.5);
q->green=(Quantum) (total.green/128.0+0.5);
{
contribution[n].pixel=start+n;
contribution[n].weight=
- filter_info->function(scale*(start+n-center+0.5),filter_info->support);
+ filter_info->function(scale*((double) start+n-center+0.5),filter_info->support);
density+=contribution[n].weight;
}
if ((density != 0.0) && (density != 1.0))
{
contribution[n].pixel=start+n;
contribution[n].weight=
- filter_info->function(scale*(start+n-center+0.5),filter_info->support);
+ filter_info->function(scale*((double) start+n-center+0.5),filter_info->support);
density+=contribution[n].weight;
}
if ((density != 0.0) && (density != 1.0))
if (resize_image == (Image *) NULL)
return ((Image *) NULL);
- order=(((double) columns*(image->rows+rows)) >
- ((double) rows*(image->columns+columns)));
+ order=(((double) columns*((size_t) image->rows+rows)) >
+ ((double) rows*((size_t) image->columns+columns)));
if (order)
source_image=CloneImage(resize_image,columns,image->rows,True,exception);
else
quantum=0;
if (order)
{
- span=source_image->columns+resize_image->rows;
+ span=(size_t) source_image->columns+resize_image->rows;
status=HorizontalFilter(image,source_image,x_factor,&filters[i],blur,
view_data_set,span,&quantum,exception);
if (status != MagickFail)
}
else
{
- span=resize_image->columns+source_image->rows;
+ span=(size_t) resize_image->columns+source_image->rows;
status=VerticalFilter(image,source_image,y_factor,&filters[i],blur,
view_data_set,span,&quantum,exception);
if (status != MagickFail)
/*
Define declarations.
*/
-#define ResourceInfinity ((magick_int64_t) (~((magick_uint64_t) 0)) >> 1)
+#define ResourceInfinity ((magick_int64_t) (~((magick_uint64_t) 0) >> 1))
#define ResourceInfoMaxIndex ((unsigned int) (sizeof(resource_info)/sizeof(resource_info[0])-1))
/*
for (count=0 ; count < number_clusters; count++)
{
- if ((r >= (cluster_array[count]->red.left-SafeMargin)) &&
- (r <= (cluster_array[count]->red.right+SafeMargin)) &&
- (g >= (cluster_array[count]->green.left-SafeMargin)) &&
- (g <= (cluster_array[count]->green.right+SafeMargin)) &&
- (b >= (cluster_array[count]->blue.left-SafeMargin)) &&
- (b <= (cluster_array[count]->blue.right+SafeMargin)))
+ if ((r >= ((double) cluster_array[count]->red.left-SafeMargin)) &&
+ (r <= ((double) cluster_array[count]->red.right+SafeMargin)) &&
+ (g >= ((double) cluster_array[count]->green.left-SafeMargin)) &&
+ (g <= ((double) cluster_array[count]->green.right+SafeMargin)) &&
+ (b >= ((double) cluster_array[count]->blue.left-SafeMargin)) &&
+ (b <= ((double) cluster_array[count]->blue.right+SafeMargin)))
{
/*
Count this pixel.
p++;
}
if (QuantumTick(y,image->rows))
- if (!MagickMonitorFormatted(y,image->rows << 1,&image->exception,
+ if (!MagickMonitorFormatted(y,(size_t) image->rows*2,&image->exception,
SegmentImageText,image->filename))
{
status=MagickFail;
# pragma omp parallel for
#endif
for (i=(-255); i <= 255; i++)
- squares[i]=i*i;
+ squares[i]=(double)i*i;
/*
Allocate image colormap.
*/
#endif
thread_row_count=row_count;
if (QuantumTick(thread_row_count,image->rows))
- if (!MagickMonitorFormatted(thread_row_count+image->rows,image->rows << 1,
+ if (!MagickMonitorFormatted((size_t) thread_row_count+image->rows,(size_t) image->rows*2,
&image->exception,
SegmentImageText,image->filename))
thread_status=MagickFail;
#endif
(void) strlcpy(message,"[%s] Rotate: 90 degrees...",sizeof(message));
- total_tiles=(((image->rows/tile_height_max)+1)*
- ((image->columns/tile_width_max)+1));
+ total_tiles=((((size_t) image->rows/tile_height_max)+1)*
+ (((size_t) image->columns/tile_width_max)+1));
tile=0;
monitor_active=MagickMonitorActive();
/*
DirectClass pixels
*/
- p=tile_pixels+(tile_height-1)*tile_width + y;
+ p=tile_pixels+((size_t) tile_height-1)*tile_width + y;
for (x=tile_height; x != 0; x--)
{
*q = *p;
*ip;
iq=rotate_indexes;
- ip=indexes+(tile_height-1)*tile_width + y;
+ ip=indexes+((size_t) tile_height-1)*tile_width + y;
for (x=tile_height; x != 0; x--)
{
*iq = *ip;
#endif
(void) strlcpy(message,"[%s] Rotate: 270 degrees...",sizeof(message));
- total_tiles=(((image->rows/tile_height_max)+1)*
- ((image->columns/tile_width_max)+1));
+ total_tiles=((((size_t) image->rows/tile_height_max)+1)*
+ (((size_t) image->columns/tile_width_max)+1));
tile=0;
monitor_active=MagickMonitorActive();
/*
DirectClass pixels
*/
- p=tile_pixels+(tile_width-1-y);
+ p=tile_pixels+((size_t) tile_width-1-y);
for (x=tile_height; x != 0; x--)
{
*q = *p;
*ip;
iq=rotate_indexes;
- ip=indexes+(tile_width-1-y);
+ ip=indexes+((size_t) tile_width-1-y);
for (x=tile_height; x != 0; x--)
{
*iq = *ip;
thread_status=MagickFail;
break;
}
- p+=x_offset+skip;
+ p+= (ptrdiff_t)x_offset+skip;
q=p-step;
- (void) memcpy(q,p,(width-(unsigned long)skip)*sizeof(PixelPacket));
+ (void) memcpy(q,p,((size_t) width-(size_t) skip)*sizeof(PixelPacket));
q+=width;
for (i=0; i < step; i++)
*q++=image->background_color;
thread_status=MagickFail;
break;
}
- p+=x_offset+width-skip;
+ p+= (ptrdiff_t)x_offset+width-skip;
q=p+step;
for (i=0; i < ((long) width - skip); i++)
*--q=(*--p);
thread_status=MagickFail;
break;
}
- p+=x_offset+width;
+ p+= (ptrdiff_t)x_offset+width;
q=p+step;
for (i=0; i < (long) width; i++)
{
thread_status=MagickFail;
break;
}
- p+=y_offset+skip;
+ p+= (ptrdiff_t)y_offset+skip;
q=p-step;
- (void) memcpy(q,p,(height-(unsigned long)skip)*sizeof(PixelPacket));
+ (void) memcpy(q,p,((size_t) height-(size_t)skip)*sizeof(PixelPacket));
q+=height;
for (i=0; i < (long) step; i++)
*q++=image->background_color;
thread_status=MagickFail;
break;
}
- p+=y_offset+height-skip;
+ p+= (ptrdiff_t)y_offset+height-skip;
q=p+step;
for (i=0; i < ((long) height - skip); i++)
*--q=(*--p);
thread_status=MagickFail;
break;
}
- p+=y_offset+height;
+ p+= (ptrdiff_t)y_offset+height;
q=p+step;
for (i=0; i < (long) height; i++)
{
count=(long) ((low_order >> 3) & 0x3f);
signature_info->message[count++]=0x80;
if (count <= (SignatureSize-8))
- (void) memset(signature_info->message+count,0,SignatureSize-8-count);
+ (void) memset(signature_info->message+count,0,SignatureSize-8-(size_t) count);
else
{
- (void) memset(signature_info->message+count,0,SignatureSize-count);
+ (void) memset(signature_info->message+count,0,SignatureSize-(size_t) count);
TransformSignature(signature_info);
(void) memset(signature_info->message,0,SignatureSize-8);
}
*/
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
- message=MagickAllocateMemory(unsigned char *,20*image->columns);
+ message=MagickAllocateArray(unsigned char *,20,image->columns);
if (message == (unsigned char *) NULL)
ThrowBinaryException3(ResourceLimitError,MemoryAllocationFailed,
UnableToComputeImageSignature);
/*
- Copyright (C) 2003 - 2019 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
# define _CRTDBG_MAP_ALLOC
#endif
#include <stdlib.h>
+#include <stddef.h> /* C'99 size_t, ptrdiff_t, NULL */
#if !defined(MSWINDOWS)
# include <unistd.h>
#else
# undef omp_set_num_threads
# define omp_set_num_threads(nthreads)
#endif /* !defined(HAVE_OPENMP) */
-
\f
/*
- Image const declarations.
+ Common const definitions
*/
-extern MagickExport const char
- *BackgroundColor,
- *BorderColor,
- *DefaultTileFrame,
- *DefaultTileGeometry,
- *DefaultTileLabel,
- *ForegroundColor,
- *HighlightColor,
- *MatteColor,
- *PSDensityGeometry,
- *PSPageGeometry;
+#define BackgroundColor "#ffffffffffff" /* white */
+#define BorderColor "#dfdfdfdfdfdf" /* gray */
+#define DefaultTileFrame "15x15+3+3"
+#define DefaultTileGeometry "120x120+4+3>"
+#define DefaultTileLabel "%f\n%wx%h\n%b"
+#define ForegroundColor "#000000000000" /* black */
+#define HighlightColor "#f1f100001e1e" /* light red */
+#define MatteColor "#bdbdbdbdbdbd" /* gray */
+#define PSDensityGeometry "72.0x72.0"
+#define PSPageGeometry "612x792>"
#define LoadImageText "[%s] Loading image: %lux%lu... "
#define SaveImageText "[%s] Saving image: %lux%lu... "
#define LoadImagesText "[%s] Loading images... "
#define SaveImagesText "[%s] Saving images... "
-extern MagickExport const unsigned long
- DefaultCompressionQuality;
+#define DefaultCompressionQuality 75U
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#define AttachBlob GmAttachBlob
#define AutoOrientImage GmAutoOrientImage
#define AverageImages GmAverageImages
-#define BackgroundColor GmBackgroundColor
#define Base64Decode GmBase64Decode
#define Base64Encode GmBase64Encode
#define BenchmarkImageCommand GmBenchmarkImageCommand
#define BlobWriteByteHook GmBlobWriteByteHook
#define BlurImage GmBlurImage
#define BlurImageChannel GmBlurImageChannel
-#define BorderColor GmBorderColor
#define BorderImage GmBorderImage
#define CatchException GmCatchException
#define CatchImageException GmCatchImageException
#define CycleColormapImage GmCycleColormapImage
#define DeallocateImageProfileIterator GmDeallocateImageProfileIterator
#define DeconstructImages GmDeconstructImages
-#define DefaultTileFrame GmDefaultTileFrame
-#define DefaultTileGeometry GmDefaultTileGeometry
-#define DefaultTileLabel GmDefaultTileLabel
#define DefineClientName GmDefineClientName
#define DefineClientPathAndName GmDefineClientPathAndName
#define DeleteImageFromList GmDeleteImageFromList
#define FlattenImages GmFlattenImages
#define FlipImage GmFlipImage
#define FlopImage GmFlopImage
-#define ForegroundColor GmForegroundColor
#define FormatSize GmFormatSize
#define FormatString GmFormatString
#define FormatStringList GmFormatStringList
#define GetUserTime GmGetUserTime
#define GlobExpression GmGlobExpression
#define GradientImage GmGradientImage
+#define GravityTypeToString GmGravityTypeToString
#define GrayscalePseudoClassImage GmGrayscalePseudoClassImage
#define HSLTransform GmHSLTransform
#define HWBTransform GmHWBTransform
#define HaldClutImage GmHaldClutImage
-#define HighlightColor GmHighlightColor
#define HighlightStyleToString GmHighlightStyleToString
#define HuffmanDecodeImage GmHuffmanDecodeImage
#define HuffmanEncode2Image GmHuffmanEncode2Image
#define InitializeLogInfoPost GmInitializeLogInfoPost
#define InitializeMagicInfo GmInitializeMagicInfo
#define InitializeMagick GmInitializeMagick
-#define InitializeMagickClientPathAndName GmInitializeMagickClientPathAndName
+#define InitializeMagickEx GmInitializeMagickEx
#define InitializeMagickExceptionHandling GmInitializeMagickExceptionHandling
#define InitializeMagickModules GmInitializeMagickModules
#define InitializeMagickMonitor GmInitializeMagickMonitor
#define InitializeMagickRandomKernel GmInitializeMagickRandomKernel
#define InitializeMagickRegistry GmInitializeMagickRegistry
#define InitializeMagickResources GmInitializeMagickResources
-#define InitializeMagickSignalHandlers GmInitializeMagickSignalHandlers
#define InitializePixelIteratorOptions GmInitializePixelIteratorOptions
#define InitializeSemaphore GmInitializeSemaphore
#define InitializeTemporaryFiles GmInitializeTemporaryFiles
#define MapImage GmMapImage
#define MapImages GmMapImages
#define MapModeToString GmMapModeToString
-#define MatteColor GmMatteColor
#define MatteFloodfillImage GmMatteFloodfillImage
#define MedianFilterImage GmMedianFilterImage
#define MetricTypeToString GmMetricTypeToString
#define OpenModules GmOpenModules
#define OrderedDitherImage GmOrderedDitherImage
#define OrientationTypeToString GmOrientationTypeToString
-#define PSDensityGeometry GmPSDensityGeometry
-#define PSPageGeometry GmPSPageGeometry
#define PackbitsEncode2Image GmPackbitsEncode2Image
#define PackbitsEncodeImage GmPackbitsEncodeImage
#define PanicDestroyMagick GmPanicDestroyMagick
#define SpliceImageIntoList GmSpliceImageIntoList
#define SplitImageList GmSplitImageList
#define SpreadImage GmSpreadImage
+#define StartTimer GmStartTimer
#define SteganoImage GmSteganoImage
#define StereoImage GmStereoImage
+#define StopTimer GmStopTimer
#define StorageTypeToString GmStorageTypeToString
#define StretchTypeToString GmStretchTypeToString
#define StringToArgv GmStringToArgv
--- /dev/null
+/*
+ Copyright (C) 2003-2020 GraphicsMagick Group
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Temporary File Management
+*/
+
+#define ThrowReaderTemporaryFileException(filename) \
+{ \
+ if ((image) == (Image *) NULL) \
+ { \
+ ThrowException(exception,FileOpenError,UnableToCreateTemporaryFile, \
+ filename); \
+ } \
+ else \
+ { \
+ ThrowException(exception,FileOpenError,UnableToCreateTemporaryFile, \
+ filename); \
+ CloseBlob(image); \
+ DestroyImageList(image); \
+ } \
+ return((Image *) NULL); \
+}
+#define ThrowWriterTemporaryFileException(filename) \
+{ \
+ assert(image != (Image *) NULL); \
+ ThrowException(&(image)->exception,FileOpenError, \
+ UnableToCreateTemporaryFile,filename); \
+ if (image_info->adjoin) \
+ while ((image)->previous != (Image *) NULL) \
+ (image)=(image)->previous; \
+ CloseBlob(image); \
+ return(False); \
+}
+
+MagickExport void
+ DestroyTemporaryFiles(void),
+ PurgeTemporaryFiles(void),
+ PurgeTemporaryFilesAsyncSafe(void);
+
+extern MagickPassFail
+ InitializeTemporaryFiles(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003, 2004 GraphicsMagick Group
+ Copyright (C) 2003-2020 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
TextFileIOMode
} FileIOMode;
-
MagickExport MagickPassFail
AcquireTemporaryFileName(char *filename),
LiberateTemporaryFile(char *filename);
AcquireTemporaryFileStream(char *filename,FileIOMode mode);
#if defined(MAGICK_IMPLEMENTATION)
-
-#define ThrowReaderTemporaryFileException(filename) \
-{ \
- if ((image) == (Image *) NULL) \
- { \
- ThrowException(exception,FileOpenError,UnableToCreateTemporaryFile, \
- filename); \
- } \
- else \
- { \
- ThrowException(exception,FileOpenError,UnableToCreateTemporaryFile, \
- filename); \
- CloseBlob(image); \
- DestroyImageList(image); \
- } \
- return((Image *) NULL); \
-}
-#define ThrowWriterTemporaryFileException(filename) \
-{ \
- assert(image != (Image *) NULL); \
- ThrowException(&(image)->exception,FileOpenError, \
- UnableToCreateTemporaryFile,filename); \
- if (image_info->adjoin) \
- while ((image)->previous != (Image *) NULL) \
- (image)=(image)->previous; \
- CloseBlob(image); \
- return(False); \
-}
-
-MagickExport void
- DestroyTemporaryFiles(void),
- PurgeTemporaryFiles(void),
- PurgeTemporaryFilesAsyncSafe(void);
-
-extern MagickPassFail
- InitializeTemporaryFiles(void);
-
+# include "magick/tempfile-private.h"
#endif /* MAGICK_IMPLEMENTATION */
#if defined(__cplusplus) || defined(c_plusplus)
/*
-% Copyright (C) 2003,2016 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
*/
static double
UserTime(void);
-
-static void
- StartTimer(TimerInfo *,const unsigned int),
- StopTimer(TimerInfo *);
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% stopwatch.
%
*/
-static void StartTimer(TimerInfo *time_info,const unsigned int reset)
+MagickExport void StartTimer(TimerInfo *time_info,const unsigned int reset)
{
assert(time_info != (TimerInfo *) NULL);
assert(time_info->signature == MagickSignature);
% o time_info: Timer statistics structure.
%
*/
-static void StopTimer(TimerInfo *time_info)
+MagickExport void StopTimer(TimerInfo *time_info)
{
assert(time_info != (TimerInfo *) NULL);
assert(time_info->signature == MagickSignature);
extern MagickExport void
GetTimerInfo(TimerInfo *),
- ResetTimer(TimerInfo *);
+ ResetTimer(TimerInfo *),
+ StartTimer(TimerInfo *time_info,const unsigned int reset),
+ StopTimer(TimerInfo *time_info);
#if defined(__cplusplus) || defined(c_plusplus)
}
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
%
%
% The format of the TransformImage method is:
%
-% void TransformImage(Image **image,const char *crop_geometry,
+% MagickPassFail TransformImage(Image **image,const char *crop_geometry,
% const char *image_geometry)
%
% A description of each parameter follows:
%
%
*/
-MagickExport void TransformImage(Image **image,const char *crop_geometry,
- const char *image_geometry)
+MagickExport MagickPassFail TransformImage(Image **image,const char *crop_geometry,
+ const char *image_geometry)
{
Image
*previous,
int
flags;
+ MagickPassFail
+ status = MagickPass;
+
assert(image != (Image **) NULL);
assert((*image)->signature == MagickSignature);
transform_image=(*image);
(flags & PercentValue))
{
crop_image=CropImage(transform_image,&geometry,&(*image)->exception);
+ if (crop_image == (Image *) NULL)
+ status = MagickFail;
}
else
if ((transform_image->columns > geometry.width) ||
}
}
if (next == (Image *) NULL)
- break;
+ {
+ status=MagickFail;
+ break;
+ }
}
}
if (crop_image != (Image *) NULL)
*image=transform_image;
}
if (image_geometry == (const char *) NULL)
- return;
+ return status;
/*
Scale image to a user specified size.
&geometry.width,&geometry.height);
if ((transform_image->columns == geometry.width) &&
(transform_image->rows == geometry.height))
- return;
+ return status;
/*
Resize image.
resize_image=ZoomImage(transform_image,geometry.width,geometry.height,
&(*image)->exception);
if (resize_image == (Image *) NULL)
- return;
+ {
+ status=MagickFail;
+ return status;
+ }
previous=transform_image->previous;
resize_image->next=transform_image->next;
DestroyImage(transform_image);
transform_image=resize_image;
*image=transform_image;
+ return status;
}
*RollImage(const Image *image,const long x_offset,const long y_offset,ExceptionInfo *exception),
*ShaveImage(const Image *image,const RectangleInfo *shave_info,ExceptionInfo *exception);
-extern MagickExport void
+extern MagickExport MagickPassFail
TransformImage(Image **,const char *,const char *);
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ Drawing methods.
+*/
+
+extern MagickExport void
+ DestroyTypeInfo(void);
+
+extern MagickPassFail
+ InitializeTypeInfo(void);
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
- Copyright (C) 2003 - 2009 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
This program is covered by multiple licenses, which are described in
const unsigned long,ExceptionInfo *);
#if defined(MAGICK_IMPLEMENTATION)
-
-extern MagickExport void
- DestroyTypeInfo(void);
-
-extern MagickPassFail
- InitializeTypeInfo(void);
-
+# include "magick/type-private.h"
#endif /* MAGICK_IMPLEMENTATION */
#if defined(__cplusplus) || defined(c_plusplus)
--- /dev/null
+/*
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
+ Copyright (C) 2002 ImageMagick Studio
+ Copyright 1991-1999 E. I. du Pont de Nemours and Company
+
+ This program is covered by multiple licenses, which are described in
+ Copyright.txt. You should have received a copy of Copyright.txt with this
+ package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
+
+ GraphicsMagick Utility Methods.
+*/
+
+/*
+ Force argument into range accepted by <ctype.h> functions.
+*/
+#define CTYPE_ARG(value) ((int) ((unsigned char) (value)))
+
+#if !defined(HAVE_STRLCAT)
+# define strlcat(dst,src,size) MagickStrlCat(dst,src,size)
+#endif
+
+#if !defined(HAVE_STRLCPY)
+# define strlcpy(dst,src,size) MagickStrlCpy(dst,src,size)
+#endif
+
+extern double MagickFmin(const double x, const double y) MAGICK_FUNC_CONST;
+extern double MagickFmax(const double x, const double y) MAGICK_FUNC_CONST;
+
+extern MagickExport MagickPassFail MagickAtoFChk(const char *str, double *value);
+extern MagickExport MagickPassFail MagickAtoIChk(const char *str, int *value);
+extern MagickExport MagickPassFail MagickAtoUIChk(const char *str, unsigned int *value);
+extern MagickExport MagickPassFail MagickAtoLChk(const char *str, long *value);
+extern MagickExport MagickPassFail MagickAtoULChk(const char *str, unsigned long *value);
+
+/*
+ Compute a value which is the next kilobyte power of 2 larger than
+ the requested value or MaxTextExtent, whichever is larger.
+
+ The objective is to round up the size quickly (and in repeatable
+ steps) in order to reduce the number of memory copies due to realloc
+ for strings which grow rapidly, while producing a reasonable size
+ for smaller strings.
+*/
+#define MagickRoundUpStringLength(size) \
+{ \
+ size_t \
+ _rounded; \
+ \
+ for (_rounded=256U; _rounded < (Max(size,256)); _rounded *= 2); \
+ size=_rounded; \
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 2
+ * fill-column: 78
+ * End:
+ */
/*
-% Copyright (C) 2003-2019 GraphicsMagick Group
+% Copyright (C) 2003-2020 GraphicsMagick Group
% Copyright (c) 2000 Markus Friedl. All rights reserved.
% Copyright (C) 2002 ImageMagick Studio
% Copyright 1991-1999 E. I. du Pont de Nemours and Company
char
username[MaxTextExtent];
+# if defined(HAVE_GETPWNAM_R)
+ struct passwd
+ pwd;
+
+ size_t
+ pwnam_buf_len;
+
+ char
+ *pwnam_buf;
+# endif /* if defined(HAVE_GETPWNAM_R) */
+
struct passwd
*entry;
p=strchr(username,'/');
if (p != (char *) NULL)
*p='\0';
- entry=getpwnam(username);
- if (entry == (struct passwd *) NULL)
- return;
- (void) strncpy(expanded_filename,entry->pw_dir,MaxTextExtent-1);
- if (p != (char *) NULL)
+
+# if defined(HAVE_GETPWNAM_R)
+ entry=(struct passwd *) NULL;
+ pwnam_buf_len = sysconf(_SC_GETPW_R_SIZE_MAX);
+ pwnam_buf=MagickAllocateMemory(char *,pwnam_buf_len);
+ if (pwnam_buf != (char *) NULL)
+ (void) getpwnam_r(username,&pwd,pwnam_buf,pwnam_buf_len,&entry);
+#else
+ entry=getpwnam(username); /* Thread-unsafe version */
+# endif /* if defined(HAVE_GETPWNAM_R) */
+ if (entry != (struct passwd *) NULL)
{
- (void) strcat(expanded_filename,"/");
- (void) strlcat(expanded_filename,p+1,MaxTextExtent);
+ (void) strncpy(expanded_filename,entry->pw_dir,MaxTextExtent-1);
+ if (p != (char *) NULL)
+ {
+ (void) strcat(expanded_filename,"/");
+ (void) strlcat(expanded_filename,p+1,MaxTextExtent);
+ }
}
+# if defined(HAVE_GETPWNAM_R)
+ MagickFreeMemory(pwnam_buf);
+# endif /* if defined(HAVE_GETPWNAM_R) */
#endif
}
(void) strlcpy(filename,expanded_filename,MaxTextExtent);
if ((number_files % prealloc_entries) == 0)
{
MagickReallocMemory(char **,vector,
- (*argc+count+prealloc_entries)*
- sizeof(char *));
+ MagickArraySize((size_t) *argc+count+prealloc_entries,
+ sizeof(char *)));
if (vector == (char **) NULL)
{
fclose(file);
Transfer file list to argument vector.
*/
MagickReallocMemory(char **,vector,
- (*argc+count+number_files+prealloc_entries)*sizeof(char *));
+ MagickArraySize((size_t) *argc+count+number_files+prealloc_entries,sizeof(char *)));
if (vector == (char **) NULL)
return(MagickFail);
const char
*separator;
- int
+ size_t
length;
separator = strchr(start,DirectoryListSeparator);
for (c=image_geometry; *c != 0 ; c++)
{
- if (isspace((int)(unsigned char) (*c)))
+ if (isspace((int) (*c)))
{
continue;
}
bounds.x=0;
bounds.y=0;
p=geometry;
- while (isspace((int)(unsigned char) *p))
+ while ((isspace((int)(*p))))
p++;
if (*p == '\0')
return(flags);
p++;
}
(*argc)++;
- argv=MagickAllocateMemory(char **,(*argc+1)*sizeof(char *));
+ argv=MagickAllocateMemory(char **,MagickArraySize((size_t) *argc+1,sizeof(char *)));
if (argv == (char **) NULL)
{
MagickError3(ResourceLimitError,MemoryAllocationFailed,
q+=(translate)(q,buffer,MaxTextExtent);
break;
}
- FormatString(buffer,"%lu",DefaultCompressionQuality);
+ FormatString(buffer,"%u",DefaultCompressionQuality);
q+=(translate)(q,buffer,MaxTextExtent);
break;
}
/*
- Copyright (C) 2003 - 2018 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
Copyright 1991-1999 E. I. du Pont de Nemours and Company
MagickStrlCpyTrunc(char *dst, const char *src, const size_t size) MAGICK_FUNC_NONNULL;
#if defined(MAGICK_IMPLEMENTATION)
-
-/*
- Force argument into range accepted by <ctype.h> functions.
-*/
-#define CTYPE_ARG(value) ((int) ((unsigned char) (value)))
-
-#if !defined(HAVE_STRLCAT)
-# define strlcat(dst,src,size) MagickStrlCat(dst,src,size)
-#endif
-
-#if !defined(HAVE_STRLCPY)
-# define strlcpy(dst,src,size) MagickStrlCpy(dst,src,size)
-#endif
-
-extern double MagickFmin(const double x, const double y) MAGICK_FUNC_CONST;
-extern double MagickFmax(const double x, const double y) MAGICK_FUNC_CONST;
-
-extern MagickExport MagickPassFail MagickAtoFChk(const char *str, double *value);
-extern MagickExport MagickPassFail MagickAtoIChk(const char *str, int *value);
-extern MagickExport MagickPassFail MagickAtoUIChk(const char *str, unsigned int *value);
-extern MagickExport MagickPassFail MagickAtoLChk(const char *str, long *value);
-extern MagickExport MagickPassFail MagickAtoULChk(const char *str, unsigned long *value);
-
-/*
- Compute a value which is the next kilobyte power of 2 larger than
- the requested value or MaxTextExtent, whichever is larger.
-
- The objective is to round up the size quickly (and in repeatable
- steps) in order to reduce the number of memory copies due to realloc
- for strings which grow rapidly, while producing a reasonable size
- for smaller strings.
-*/
-#define MagickRoundUpStringLength(size) \
-{ \
- size_t \
- _rounded; \
- \
- for (_rounded=256U; _rounded < (Max(size,256)); _rounded *= 2); \
- size=_rounded; \
-}
-
+# include "magick/utility-private.h"
#endif /* defined(MAGICK_IMPLEMENTATION) */
#if defined(__cplusplus) || defined(c_plusplus)
/*
- Copyright (C) 2003 - 2019 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
Copyright 1991-1999 E. I. du Pont de Nemours and Company
identifying the release.
*/
#define MagickPackageName "GraphicsMagick"
-#define MagickCopyright "Copyright (C) 2002-2019 GraphicsMagick Group.\nAdditional copyrights and licenses apply to this software.\nSee http://www.GraphicsMagick.org/www/Copyright.html for details."
-#define MagickLibVersion 0x232002
-#define MagickLibVersionText "1.3.34"
-#define MagickLibVersionNumber 23,20,2
-#define MagickChangeDate "20191224"
-#define MagickReleaseDate "2019-12-24"
+#define MagickCopyright "Copyright (C) 2002-2020 GraphicsMagick Group.\nAdditional copyrights and licenses apply to this software.\nSee http://www.GraphicsMagick.org/www/Copyright.html for details."
+#define MagickLibVersion 0x242100
+#define MagickLibVersionText "1.3.35"
+#define MagickLibVersionNumber 24,21,0
+#define MagickChangeDate "20200223"
+#define MagickReleaseDate "2020-02-23"
/*
The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines
MagickLibVersionNumber, but these are broken out and simplified so
that they can be easily used in C pre-processor logic.
*/
-#define MagickLibInterfaceNewest 23
+#define MagickLibInterfaceNewest 24
#define MagickLibInterfaceOldest 3
#if (QuantumDepth == 8)
/*
- Copyright (C) 2003 - 2019 GraphicsMagick Group
+ Copyright (C) 2003 - 2020 GraphicsMagick Group
Copyright (C) 2002 ImageMagick Studio
Copyright 1991-1999 E. I. du Pont de Nemours and Company
identifying the release.
*/
#define MagickPackageName "@PACKAGE_NAME@"
-#define MagickCopyright "Copyright (C) 2002-2019 GraphicsMagick Group.\nAdditional copyrights and licenses apply to this software.\nSee http://www.GraphicsMagick.org/www/Copyright.html for details."
+#define MagickCopyright "Copyright (C) 2002-2020 GraphicsMagick Group.\nAdditional copyrights and licenses apply to this software.\nSee http://www.GraphicsMagick.org/www/Copyright.html for details."
#define MagickLibVersion @MAGICK_LIB_VERSION@
#define MagickLibVersionText "@MAGICK_LIB_VERSION_TEXT@"
#define MagickLibVersionNumber @MAGICK_LIB_VERSION_NUMBER@
/*
-% Copyright (C) 2003 - 2019 GraphicsMagick Group
+% Copyright (C) 2003 - 2020 GraphicsMagick Group
% Copyright (C) 2002 ImageMagick Studio
%
% This program is covered by multiple licenses, which are described in
(void) XBell(display,0);
}
(void) XCloseDisplay(display);
+ StopTimer(&image->timer);
return(image);
}
\f
footer_template = """
<hr class="divider">
<div class="footer">
- <p><a href="%(url_prefix)sCopyright.html">Copyright</a>GraphicsMagick Group 2002 - 2019</p>
+ <p><a href="%(url_prefix)sCopyright.html">Copyright</a>GraphicsMagick Group 2002 - 2020</p>
</div>
"""
reps = atoi(argv[2]);
bits = atoi(argv[3]);
- bytes=(unsigned char *)malloc(reps*2);
+ bytes=(unsigned char *)calloc(reps,2);
if (!bytes)
{
(void) printf("Failed to allocate %lu bytes\n", (unsigned long) reps*2);
(!strcmp( "UYVY", format )) ||
(!strcmp( "WEBP", format )) ||
(!strcmp( "YUV", format )) ||
+
+ (!strcmp( "EPDF", format )) ||
+ (!strcmp( "EPI", format )) ||
+ (!strcmp( "EPS", format )) ||
+ (!strcmp( "EPSF", format )) ||
+ (!strcmp( "EPSI", format )) ||
+ (!strcmp( "EPT", format )) ||
+ (!strcmp( "PDF", format )) ||
+ (!strcmp( "PS", format )) ||
+ (!strcmp( "PS2", format )) ||
+
(final->compression == JPEGCompression))
fuzz_factor = 0.06;
(!strcmp( "UYVY", format )) ||
(!strcmp( "WEBP", format )) ||
(!strcmp( "YUV", format )) ||
+
+ (!strcmp( "EPDF", format )) ||
+ (!strcmp( "EPI", format )) ||
+ (!strcmp( "EPS", format )) ||
+ (!strcmp( "EPSF", format )) ||
+ (!strcmp( "EPSI", format )) ||
+ (!strcmp( "EPT", format )) ||
+ (!strcmp( "PDF", format )) ||
+ (!strcmp( "PS", format )) ||
+ (!strcmp( "PS2", format )) ||
+
(final->compression == JPEGCompression))
fuzz_factor = 0.06;
-.TH gm 1 "2019/08/27" "GraphicsMagick"
+.TH gm 1 "2019/12/29" "GraphicsMagick"
.TP
.in 15
.in 15
.in 15
.in 15
+.B "gradient:direction={South|North|West|East|NorthWest|NorthEast|SouthWest|SouthEast}"
+.in 20
+ \fR
+.in 20
+By default, the gradient coder produces a gradient from top to
+bottom ("South"). Since GraphicsMagick 1.3.35, the gradient direction
+may be specified to produce gradient vectors according to a
+gravity-like specification. The arguments are \fBSouth\fP (Top to
+Bottom), \fBNorth\fP (Bottom to Top), \fBWest\fP (Right to Left),
+\fBEast\fP (Left to Right), \fBNorthWest\fP (Bottom-Right to
+Top-Left), \fBNorthEast\fP (Bottom-Left to Top-Right),
+\fBSouthWest\fP (Top-Right Bottom-Left), and \fBSouthEast\fP
+(Top-Left to Bottom-Right).
+
+.in 15
+.in 15
.B "jp2:rate=<value>"
.in 20
\fR
To display the version information:
GraphicsMagick 1.3.27a 2017-12-11 Q16 http://www.GraphicsMagick.org/
- Copyright (C) 2002-2017 GraphicsMagick Group.
+ Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
# Package base version. This is is the numeric version suffix applied to
# PACKAGE_NAME (e.g. "1.2").
-PACKAGE_VERSION='1.3.34'
+PACKAGE_VERSION='1.3.35'
#
# Package name plus version string.
#
# Formal Package release date
# Set to string "unreleased" if package is not a formal release.
-PACKAGE_RELEASE_DATE="2019-12-24"
-#PACKAGE_RELEASE_DATE="unreleased"
+PACKAGE_RELEASE_DATE="2020-02-23"
#
# Date of last ChangeLog update
#
# Magick library versioning
#
-MAGICK_LIBRARY_CURRENT=23
-MAGICK_LIBRARY_REVISION=2
-MAGICK_LIBRARY_AGE=20
+MAGICK_LIBRARY_CURRENT=24
+MAGICK_LIBRARY_REVISION=0
+MAGICK_LIBRARY_AGE=21
#
# Magick++ library versioning
#
MAGICK_PLUS_PLUS_LIBRARY_CURRENT=16
-MAGICK_PLUS_PLUS_LIBRARY_REVISION=2
+MAGICK_PLUS_PLUS_LIBRARY_REVISION=3
MAGICK_PLUS_PLUS_LIBRARY_AGE=4
#
# Magick Wand library versioning
#
MAGICK_WAND_LIBRARY_CURRENT=11
-MAGICK_WAND_LIBRARY_REVISION=3
+MAGICK_WAND_LIBRARY_REVISION=4
MAGICK_WAND_LIBRARY_AGE=9
if (drawing_wand->graphic_context != (DrawInfo **) NULL)
{
clone_wand->graphic_context=MagickAllocateArray(DrawInfo **,
- drawing_wand->index+1,
+ (size_t) drawing_wand->index+1,
sizeof(DrawInfo *));
if (clone_wand->graphic_context == (DrawInfo **) NULL)
{
goto clone_drawing_wand_fail;
}
(void) memset(clone_wand->graphic_context,0,
- (drawing_wand->index+1)*sizeof(DrawInfo *));
+ ((size_t) drawing_wand->index+1)*sizeof(DrawInfo *));
for (clone_wand->index=0; clone_wand->index <= drawing_wand->index; clone_wand->index++)
{
assert(drawing_wand->signature == MagickSignature);
drawing_wand->index++;
MagickReallocMemory(DrawInfo **,drawing_wand->graphic_context,
- (drawing_wand->index+1)*sizeof(DrawInfo *));
+ MagickArraySize((size_t) drawing_wand->index+1,sizeof(DrawInfo *)));
if (drawing_wand->graphic_context == (DrawInfo **) NULL)
{
drawing_wand->index--;
dash_array=(double *)NULL;
if (n != 0)
{
- dash_array=MagickAllocateArray(double *, n+1, sizeof(double));
+ dash_array=MagickAllocateArray(double *, (size_t) n+1, sizeof(double));
p=CurrentContext->dash_pattern;
q=dash_array;
i=n;
if (n_new != 0)
{
CurrentContext->dash_pattern=MagickAllocateArray(double *,
- (n_new+1),
+ ((size_t) n_new+1),
sizeof(double));
if (!CurrentContext->dash_pattern)
{
<p>2009-09-17 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>version.sh: Released GraphicsMagick 1.3.7.</li>
+</ul>
+</blockquote>
+<p>2009-09-17 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>coders/msl.c, doc/conjure.imdoc: Add support for a new <cite>profile</cite>
command in MSL/conjure which applies, adds, or removes one or more
IPTC, ICC or generic profiles from a file. Work contributed by
reported by Patrick Welche.</li>
</ul>
</blockquote>
+<p>2010-03-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>version.sh: Released GraphicsMagick 1.3.12.</li>
+</ul>
+</blockquote>
<p>2010-03-03 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">
Vladimir Stavrinov.</li>
</ul>
</blockquote>
+<p>2010-02-21 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>version.sh: Released GraphicsMagick 1.3.11.</li>
+</ul>
+</blockquote>
<p>2010-02-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>
<ul class="simple">
Arseny Solokha. Resolves SourceForge patch #2953314.</li>
</ul>
</blockquote>
+<p>2010-02-10 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>version.sh: Released GraphicsMagick 1.3.10.</li>
+</ul>
+</blockquote>
<p>2010-02-09 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">
Coetzee.</li>
</ul>
</blockquote>
+<p>2010-02-04 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>version.sh: Released GraphicsMagick 1.3.9.</li>
+</ul>
+</blockquote>
<p>2010-02-03 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">
of threads is reduced from the original value.</li>
</ul>
</blockquote>
+<p>2010-01-21 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>version.sh: Released GraphicsMagick 1.3.8.</li>
+<li>NEWS.txt: Update for the 1.3.8 release.</li>
+</ul>
+</blockquote>
<p>2010-01-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">
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
+<title>ChangeLog-2019.rst</title>
+<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
+</head>
+<body>
+
+<div class="banner">
+<img src="images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
+<span class="title">GraphicsMagick</span>
+<form action="http://www.google.com/search">
+ <input type="hidden" name="domains" value="www.graphicsmagick.org" />
+ <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
+ <span class="nowrap"><input type="text" name="q" size="25" maxlength="255" /> <input type="submit" name="sa" value="Search" /></span>
+</form>
+</div>
+
+<div class="navmenu">
+<ul>
+<li><a href="index.html">Home</a></li>
+<li><a href="project.html">Project</a></li>
+<li><a href="download.html">Download</a></li>
+<li><a href="README.html">Install</a></li>
+<li><a href="Hg.html">Source</a></li>
+<li><a href="NEWS.html">News</a> </li>
+<li><a href="utilities.html">Utilities</a></li>
+<li><a href="programming.html">Programming</a></li>
+<li><a href="reference.html">Reference</a></li>
+</ul>
+</div>
+<div class="document">
+
+
+<p>2019-12-31 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>coders/gradient.c (ReadGRADIENTImage): QueryColorDatabase() only
+throws a warning so allow the warning to propagate to the user
+rather than failing to report a useful message at all.</li>
+</ul>
+</blockquote>
+<p>2019-12-30 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>magick/gradient.c (GradientImage): OpenMP portability requires
+that loop variable be signed.</li>
+</ul>
+</blockquote>
+<p>2019-12-30 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
+<blockquote>
+<ul class="simple">
+<li>magick/gradient.c: Visual studio does not compile file without
+this fix.</li>
+</ul>
+</blockquote>
+<p>2019-12-30 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
+<blockquote>
+<ul class="simple">
+<li>VisualMagickconfigureconfigure.cpp Add option for speed optimisation
+to achieve better performance.</li>
+</ul>
+</blockquote>
+<p>2019-12-29 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>magick/version.h.in: Bump copyright years.</li>
+<li>magick/image.c (DisplayImages): Fix return status. Was
+returning inverted return status.</li>
+<li>coders/gradient.c (ReadGRADIENTImage): Support the
+"gradient:direction" definition to produce produce additional
+gradient vector directions corresponding to South, North, West,
+East, NorthWest, NorthEast, SouthWest, and SouthEast. This
+support is similar to a useful feature added in ImageMagick
+6.9.2.5 although there is no claim that the results are identical,
+even if the resulting images appear to be visually
+indistinguishable.</li>
+<li>magick/gradient.c (GradientImage): Add support for using the
+image 'gravity' attribute to produce additional gradient vector
+directions corresponding to SouthGravity (the previously-existing
+default), NorthGravity, WestGravity, EastGravity,
+NorthWestGravity, NorthEastGravity, SouthWestGravity, and
+SouthEastGravity. Gradient images are updated to be PseudoClass
+(color-mapped), if possible.</li>
+</ul>
+</blockquote>
+<p>2019-12-28 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>magick/gradient.c (GradientImage): Output PseudoClass images if
+we can.</li>
+<li>coders/pcx.c (WritePCXImage): Fix heap overflow in PCX writer
+when bytes per line value overflows its 16-bit storage unit.
+Fixes SourceForge bug #619 "heap-buffer-overflow in WritePCXImage"
+reported by Suhwan Song.</li>
+<li>magick/gradient.c (GradientImage): Gradient levels were still
+not spot-on. Now they are. Unfortunately, this necessitated
+re-generating reference test images based on gradient since the
+gradient output has changed a little bit more than the test error
+margins allow.</li>
+</ul>
+</blockquote>
+<p>2019-12-25 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>magick/render.c (DrawImage): Test gradient image resource limits
+using the proper API.</li>
+<li>magick/resource.c (ResourceInfinity): Fix definition of
+ResourceInfinity. Due to parenthesis in the wrong place, the
+defined value was -1 rather than the maximum range value. The
+effect of this is that GetMagickResource() would return -1 rather
+than the maximum range value for the return type as documented.
+Regression was added on Saturday, March 09, 2019 in the 1.3.32
+release via changeset 15927:a5318823758c.</li>
+<li>tests/rwfile.c (main): Allow Ghostscript supported formats to be
+a bit lossy.</li>
+<li>tests/rwblob.c (main): Allow Ghostscript supported formats to be
+a bit lossy.</li>
+<li>magick/gradient.c (GradientImage): Compute blending alpha with
+double precision for more precision.</li>
+</ul>
+</blockquote>
+<p>2019-12-24 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>NEWS.txt: Updates in preparation for 1.3.34 release.</li>
+</ul>
+</blockquote>
+<p>2019-12-22 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>NEWS.txt: Update with changes since the last GM release.</li>
+<li>coders/png.c (png_read_raw_profile): Use size_t type to store
+profile length and 'nibbles'. Use safer way to test for profile
+buffer overflow.
+(ReadOnePNGImage): Use size_t type to store 'ping_rowbytes',
+'length', and 'row_offset'. Check png_pixels allocation for
+arithemetic overflow when computing the required allocation size.</li>
+<li>coders/tiff.c (WriteNewsProfile): Use size_t type to store
+profile length.</li>
+<li>coders/pict.c (WritePICTImage): Avoid 'alloc-size-larger-than'
+warning from GCC when allocating row_bytes.</li>
+</ul>
+</blockquote>
+<p>2019-12-21 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>tiff/libtiff/tiffconf.h: Add standard/common libtiff 'SUPPORT'
+options which are used in full-fledged Autoconf/Cmake libtiff
+builds but were missing from the Visual C template file. In
+particular, WebP is now supported and JBIG is somewhat supported.</li>
+<li>VisualMagick/jbig/libjbig/LIBRARY.txt (EXCLUDE): Remove
+tstcodec85.c from JBIG library build.</li>
+<li>VisualMagick/configure/configure.cpp: Add JBIG library to
+include path when building libraries. Add WebP as a dependency
+when building libtiff.</li>
+</ul>
+</blockquote>
+<p>2019-12-16 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>magick/nt_base.h ("C"): Assume that float versions of functions
+became available in Visual Studio 2008.</li>
+</ul>
+</blockquote>
+<p>2019-12-15 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>magick/log.c (InitializeLogInfo): Using the compiled-in
+defaults, always log to stderr by default, even under Microsoft
+Windows. The logging output may then be diverted to
+'win32eventlog' as soon as a log.mgk file is loaded if that is
+desired. This should not be much of a problem because loading a
+log.mgk file is the first thing that the library attempts to do.
+This change is made due to users and developers being baffled at
+not seeing any log output due to the log output going to the (very
+unfriendly) Windows application log.</li>
+<li>webp: libwebp is updated to the 1.0.3 release.</li>
+</ul>
+</blockquote>
+<p>2019-12-15 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
+<blockquote>
+<ul class="simple">
+<li>magick/nt_base.c Fix user only installation of Ghostscript.</li>
+</ul>
+</blockquote>
+<p>2019-12-14 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>rungm.sh.in (DIRSEP): DIRSEP should always use Unix conventions for
+Autotools-based builds.</li>
+<li>magick/module.h ("C"): Eliminiate redundant and conflicting
+ListModuleInfo() prototype.</li>
+<li>coders/miff.c (ReadMIFFImage): Eliminate warnings in trace
+statements.</li>
+<li>coders/dib.c (DecodeImage): Eliminate warnings in trace
+statements.</li>
+<li>coders/bmp.c (DecodeImage): Eliminate warnings in trace
+statements.</li>
+<li>magick/studio.h (SupportMagickModules): Fix the preprocessor
+logic controlling SupportMagickModules, which became broken for
+GCC MinGW-based builds starting in the 1.3.29 release when a
+"static" module loader was implemented. Due to an error in the
+preprocessor logic, only the "modules" based build was working for
+MinGW. Much thanks to Giovanni Remigi for making us aware of this
+issue.</li>
+</ul>
+</blockquote>
+<p>2019-12-12 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>coders/pict.c (WritePICTImage): Throw a writer exception if the
+PICT width limit is exceeded. Fixes SourceForge issue 617
+"heap-buffer-overflow in function EncodeImage of coders/pict.c".</li>
+</ul>
+</blockquote>
+<p>2019-12-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>jbig: jbigkit is updated to 2.1 release.</li>
+<li>libxml: libxml2 is updated to 2.9.10 release.</li>
+<li>bzlib: bzip is updated to 1.0.8 release.</li>
+<li>zlib: zlib is updated to 1.2.11 release.</li>
+<li>png: libpng is updated to 1.6.37 release.</li>
+</ul>
+</blockquote>
+<p>2019-12-07 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>lcms: lcms2 is updated to 2.9 release.</li>
+<li>tiff: libtiff is updated to 4.1.0 release.</li>
+</ul>
+</blockquote>
+<p>2019-11-24 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>magick/render.c (DrawPatternPath): Don't leak memory if
+fill_pattern or stroke_pattern of cloned draw_info are not null.
+Fixes oss-fuzz issue 18948 "graphicsmagick:coder_MVG_fuzzer:
+Indirect-leak in CloneImage".
+(PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
+memory.</li>
+</ul>
+</blockquote>
+<p>2019-11-23 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>magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
+17986 "graphicsmagick:coder_JPG_fuzzer: Heap-buffer-overflow in
+GenerateEXIFAttribute". This problem likely only happens in
+32-bit builds.</li>
+</ul>
+</blockquote>
+<p>2019-11-17 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>coders/png.c (ReadMNGImage): Only magnify the image if the
+requested magnification methods are supported.</li>
+</ul>
+</blockquote>
+<p>2019-11-16 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>magick/compress.c (HuffmanDecodeImage): Fix signed overflow on
+range check which leads to heap overflow in 32-bit
+applications. Requires a relatively large file input compared with
+typical fuzzer files (greater than a megabyte) to trigger.
+Problem reported to the graphicsmagick-security mail address by
+Justin Tripp on 2019-11-13.
+(Ascii85Tuple): Fix thread safety issue by requiring caller to
+pass in tuple buffer as an argument and having callers allocate
+tuple buffer on the stack.</li>
+</ul>
+</blockquote>
+<p>2019-11-10 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>magick/bit_stream.c: Add restrict declarations to slightly
+improve performance and decrease code size.</li>
+<li>TclMagick/pkgIndex.tcl: Incorporate recommendations from third
+problem noted in SourceForge issue #420 "TclMagick issues and
+patch". This is supposed to help support using an uninstalled
+GraphicsMagick and allow the installation path to contain a space.</li>
+<li>wand/magick_wand.c (MagickClearException): Destroy any existing
+exception info before re-initializing the exception info or else
+there will be a memory leak.</li>
+<li>TclMagick/generic/libttkcommon.c (myMagickError): Clear
+exception from the Wand after it has been reported. Addresses the
+fourth problem noted by SourceForge issue #420 "TclMagick issues
+and patch". However, MagickClearException() already clears an
+exception in the Wand, so a new function is not needed.</li>
+<li>TclMagick/unix/m4/tcl.m4: Change hard-coded INSTALL path to
+point to config/install-sh. Re-generated/updated Autotools stuff
+by executing the genconf.sh script. Addresses the first problem
+noted by SourceForge issue #420 "TclMagick issues and patch".</li>
+</ul>
+</blockquote>
+<p>2019-11-02 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>magick/pixel_cache.c (SetNexus): Eliminate warning about
+possibly uninitialized variable from primordial GCC 3.4.3.</li>
+<li>magick/render.c (ConvertPrimitiveToPath): Eliminate warning that
+IsClosedSubPath might be used uninitialized.</li>
+<li>magick/common.h ("MAGICK_FALLTHROUGH"): Added a
+MAGICK_FALLTHROUGH macro to support the GCC/Clang fallthrough
+attribute when the time comes again that it would be useful.</li>
+</ul>
+</blockquote>
+<p>2019-10-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>
+<ul class="simple">
+<li>coders/pcx.c (ReadPCXImage): Verify that pixel region is not
+negative. Assure that opacity channel is initialized to
+opaqueOpacity. Update DirectClass representation while
+PseudoClass representation is updated. Improve read performance
+with uncompressed PCX.</li>
+</ul>
+</blockquote>
+<p>2019-10-16 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>coders/xpm.c (ReadXPMImage): Image properties are expected to
+appear within the first 512 bytes of the XPM file header. fixes
+oss-fuzz 18267 "graphicsmagick:coder_PICON_fuzzer: Timeout in
+coder_PICON_fuzzer".</li>
+</ul>
+</blockquote>
+<p>2019-10-14 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>configure.ac: Fix tcmalloc configuration report.</li>
+</ul>
+</blockquote>
+<p>2019-10-13 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>coders/wpg.c (ReadWPGImage): Implement subimage/subrange
+support.</li>
+<li>coders/mat.c (ReadMATImage, ReadMATImageV4): Implement
+subimage/subrange support. Should resolve oss-fuzz 14999
+"graphicsmagick/coder_MAT_fuzzer: Out-of-memory in
+graphicsmagick_coder_MAT_fuzzer".</li>
+<li>coders/tiff.c (TIFFMapBlob): Fix compile problem if
+LOG_TIFF_BLOB_IO is defined.</li>
+<li>coders/wpg.c (ExtractPostscript): Improve performance. Avoid
+temporary files if possible. Avoid additional memory allocations
+if possible. Should address oss-fuzz issue 18173
+"graphicsmagick:enhance_fuzzer: Timeout in enhance_fuzzer" and
+oss-fuzz issue 17714 "graphicsmagick:coder_WPG_fuzzer: Timeout in
+coder_WPG_fuzzer".</li>
+</ul>
+</blockquote>
+<p>2019-10-12 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>coders/pnm.c (PNMInteger): Place a generous arbitrary limit on
+the amount of PNM comment text to avoid denial of service
+opportunity. Fixes oss-fuzz 18162 "Timeout · coder_PNM_fuzzer".</li>
+</ul>
+</blockquote>
+<p>2019-10-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>coders/dps.c (ReadDPSImage): Fix memory leak when OpenBlob()
+reports failure. Same as ImageMagick CVE CVE-2019-16709.</li>
+</ul>
+</blockquote>
+<p>2019-09-27 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>magick/attribute.c (GenerateEXIFAttribute): Skip
+unsupported/invalid format 0. Fixes oss-fuzz issue 17597
+"graphicsmagick:coder_SFW_fuzzer: Heap-buffer-overflow in
+GenerateEXIFAttribute".</li>
+</ul>
+</blockquote>
+<p>2019-09-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>
+<ul class="simple">
+<li>fuzzing/oss-fuzz-build.sh: Change by Alex Gaynor so that the
+correct oss-fuzz fuzzing engine should be used.</li>
+</ul>
+</blockquote>
+<p>2019-09-18 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>magick/static.c (OpenModule): Static module loader should use
+upper-cased magick string when searching for a module alias.
+Fixes SourceForge issue #613 "static module loader is still
+case-sensitive".</li>
+</ul>
+</blockquote>
+<p>2019-09-16 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>configure.ac: Report status of zstd (FaceBook Zstandard)
+compression in configuration summary.</li>
+</ul>
+</blockquote>
+<p>2019-09-15 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>magick/render.c (TraceArcPath): Substitute a lineto command when
+tracing arc is impossible. Fixes oss-fuzz 10765
+"graphicsmagick/coder_MVG_fuzzer: Divide-by-zero in TraceArcPath".</li>
+</ul>
+</blockquote>
+<p>2019-09-14 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>coders/png.c (png_read_raw_profile): Fix validation of raw
+profile length. Fixes oss-fuzz 16906
+"graphicsmagick:coder_ICO_fuzzer: Out-of-memory in
+graphicsmagick_coder_ICO_fuzzer".</li>
+<li>coders/wpg.c (ReallocColormap): Avoid dereferencing a null
+pointer if image->colormap is null. Fixes oss-fuzz 17004
+"graphicsmagick:coder_WPG_fuzzer: Null-dereference READ in
+ReallocColormap".</li>
+</ul>
+</blockquote>
+<p>2019-09-13 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>magick/memory.c (MagickRealloc): Add a note that the behavior of
+this function is as described for BSD reallocf(3), which is now
+appearing in Linux's GNU libc and elsewhere.</li>
+</ul>
+</blockquote>
+<p>2019-09-09 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>www/OpenMP.rst: Document the significant OpenMP speed-up which
+may be obtained by using an alternate memory allocation library.
+Currently 'tcmalloc', 'mtmalloc', and 'umem' are supported as
+options.</li>
+<li>www/INSTALL-unix.rst: Document new --with-tcmalloc option to
+enable using Google gperftools tcmalloc library.</li>
+<li>configure.ac: Add support for using Google gperftools tcmalloc
+library via the --with-tcmalloc option.</li>
+<li>scripts/rst2htmldeco.py: Port to Python 3 syntax and require at
+least Python 2.6.</li>
+<li>scripts/relpath.py: Port to Python 3 syntax and require
+at least Python 2.6.</li>
+<li>scripts/html_fragments.py: Port to Python 3 syntax and require
+at least Python 2.6.</li>
+<li>scripts/format_c_api_doc.py: Port to Python 3 syntax and require
+at least Python 2.6.</li>
+</ul>
+</blockquote>
+<p>2019-08-27 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>doc/GraphicsMagick.imdoc: Document gm utility exit status codes.</li>
+</ul>
+</blockquote>
+<p>2019-08-25 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>magick/render.c (PRIMITIVE_INFO_POINTS_MAX): SIZE_MAX apparently
+rounds up by one when cast to a double on 64-bit systems. Due to
+this, and in order to set more rational implementation limits, add
+a PRIMITIVE_INFO_POINTS_MAX definition which computes and
+constrains the maximum number of PrimitiveInfo entries allowed.</li>
+</ul>
+</blockquote>
+<p>2019-08-24 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>magick/attribute.c (GenerateEXIFAttribute): Check that we are
+not being directed to read an IFD that we are already parsing and
+quit in order to avoid a loop. Addresses oss-fuzz 15753
+"graphicsmagick/coder_JPEG_fuzzer: Timeout in
+graphicsmagick_coder_JPEG_fuzzer" and 16068
+"graphicsmagick/coder_SFW_fuzzer: Timeout in
+graphicsmagick_coder_SFW_fuzzer".</li>
+<li>tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
+irritating GCC 9 "__builtin_strncpy' output may be truncated"
+warnings due to copying MaxTextExtent-1 characters. Instead
+request copying all of the characters and also assure that string
+is still null terminated.</li>
+<li>doc/environment.imdoc: Update documentation pertaining to HOME
+and MAGICK_DEBUG environment variables.</li>
+</ul>
+</blockquote>
+<p>2019-08-23 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>magick/log.c (DestroyLogInfo): Only output text to terminate an
+XML format log file if XML format is active.</li>
+</ul>
+</blockquote>
+<p>2019-08-22 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>magick/render.c (ExtractTokensBetweenPushPop): Previous fix for
+non-terminal loop was broken by a last-minute untested edit.
+Finally addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer:
+Timeout in graphicsmagick_coder_MVG_fuzzer".</li>
+</ul>
+</blockquote>
+<p>2019-08-17 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>fuzzing/utils.cc (MemoryResource): Lessen the memory limit used
+for oss-fuzz testing in order to provide more headroom and margin
+for error.</li>
+<li>magick/render.c (TraceBezier): Detect arithmetic overflow and
+return errors via normal error path rather than exiting. Fixes
+oss-fuzz 16450 "graphicsmagick:coder_MVG_fuzzer: Unexpected-exit
+in DefaultFatalErrorHandler".
+(PrimitiveInfoRealloc): Implement more paranoid code related to
+primitive allocation.</li>
+</ul>
+</blockquote>
+<p>2019-08-16 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>magick/render.c (DrawStrokePolygon): Handle case where
+TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
+"graphicsmagick/coder_MVG_fuzzer: ASSERT: primitive_info !=
+(PrimitiveInfo *) NULL".
+(DrawDashPolygon): Handle case where DrawStrokePolygon() returns
+MagickFail. Also needed to address oss-fuzz 15516, since otherwise
+test-cases run for a very long time.
+(ExtractTokensBetweenPushPop): Fix non-terminal parsing loop.
+Addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer: Timeout
+in graphicsmagick_coder_MVG_fuzzer".</li>
+</ul>
+</blockquote>
+<p>2019-08-15 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>magick/memory.h (MagickMallocAlignedArray): Add function
+attributes for added value and to quench GCC 9 warning with
+special build options enabled.</li>
+<li>magick/deprecate.h (AcquireMemory): Add more function attributes
+to quench GCC 9 warning with special build options enabled.</li>
+<li>magick/attribute.c (GenerateEXIFAttribute): Fix compilation
+warning in 32-bit build.</li>
+<li>coders/dpx.c (AttributeToString): Eliminate annoying warnings
+from GCC 9, although the code was correct.</li>
+<li>coders/msl.c (MSLStartElement): Fix defective opacity percentage
+code revealed by GCC 9 warning.</li>
+</ul>
+</blockquote>
+<p>2019-08-14 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>coders/png.c (ReadMNGImage): Skip coalescing layers if there is
+only one layer. Fixes oss-fuzz 16274
+"graphicsmagick/coder_MNG_fuzzer: Unexpected-exit in
+DefaultFatalErrorHandler".</li>
+</ul>
+</blockquote>
+<p>2019-08-12 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>coders/png.c (ReadPNGImage): Post-processing to convert the
+image type in the PNG reader based on a specified magick prefix
+string is now disabled. This can (and should) be done after the
+image has been returned. Fixes oss-fuzz 16386
+"graphicsmagick:coder_PNG8_fuzzer: Timeout in
+graphicsmagick_coder_PNG8_fuzzer".</li>
+</ul>
+</blockquote>
+<p>2019-07-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>NEWS.txt: Updates in preparation for 1.3.33 release.</li>
+</ul>
+</blockquote>
+<p>2019-07-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>
+<ul class="simple">
+<li>NEWS.txt: Updated NEWS to reflect updates since last release.</li>
+</ul>
+</blockquote>
+<p>2019-07-12 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>coders/png.c (WriteOnePNGImage): Fix saving to palette when
+image has an alpha channel but no color is marked as transparent.
+Patch submitted by Przemysław Sobala via SourceForge patch #61
+"WriteOnePNGImage(): Fix saving to palette when image has an alpha
+channel but no color is marked as transparent".</li>
+<li>doc/options.imdoc (characters): Fix -format documentation to
+reflect that '%r' returns the image type. Patch submitted by
+Przemysław Sobala via SourceForge patch #60 "Fix documentation
+typo".</li>
+</ul>
+</blockquote>
+<p>2019-07-07 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>magick/tempfile.c (AcquireTemporaryFileDescriptor): Fix
+compilation under Cygwin. Patch by Marco Atzeri and submitted via
+email to the graphicsmagick-help mailing list on Fri, 5 Jul 2019.</li>
+</ul>
+</blockquote>
+<p>2019-06-23 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>magick/attribute.c (GenerateEXIFAttribute): Added range checks
+and tracing. Fixes oss-fuzz 14998
+"graphicsmagick/coder_JPEG_fuzzer: Heap-buffer-overflow in
+Read32s". This is a tiny read overflow.</li>
+<li>coders/miff.c (ReadMIFFImage): Similar fix as to mpc.c</li>
+<li>coders/mpc.c (ReadMPCImage): Fix faulty signed overflow logic
+for profiles[i].length which still allowed overflow. Fixes
+oss-fuzz issue 15190 "graphicsmagick/coder_MPC_fuzzer:
+Out-of-memory in graphicsmagick_coder_MPC_fuzzer".</li>
+<li>doc/options.imdoc: Add notes about security hazards due to
+commands which support a <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax.</li>
+<li>www/security.rst: Add notes about security hazards due to
+commands which support a <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax.</li>
+</ul>
+</blockquote>
+<p>2019-06-22 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>magick/render.c (DrawImage): Assure that 'token' is initialized.
+Fixes oss-fuzz issue 14897 "graphicsmagick/coder_MVG_fuzzer:
+Use-of-uninitialized-value in DrawImage".</li>
+<li>magick/animate.c (MagickXAnimateImages): Fix memory leak of
+scene_info.pixels.</li>
+<li>magick/display.c (MagickXDisplayImage): Fix heap overwrite of
+windows->image.name and windows->image.icon_name buffers. It
+appears that the code assumed that CloneString() would always
+allocated a string at least MaxTextExtent in size. I assume that
+this issue has existed for a very long time since CloneString()
+was re-written many years ago.</li>
+<li>coders/caption.c (ReadCAPTIONImage): The CAPTION reader did not
+appear to work at all any more. Now it works again, but still not
+very well.</li>
+<li>magick/command.c: Re-implement '@' file inclusion support for
+-comment, -draw, -format, and -label which was removed for the
+1.3.32 release. Note that arguments from untrusted sources will
+still need to be sanitized to detect attempts to subvert this
+feature to access file data, but this feature has always been
+supported by GraphicsMagick and it originated early in the
+development of ImageMagick.</li>
+</ul>
+</blockquote>
+<p>2019-06-17 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>magick/utility.c (MagickStrlCat, MagickStrlCpy): Add debug
+checks enabled by MAGICK_STRL_CHECK.</li>
+<li>magick/montage.c (MontageImages): Fix wrong length argument to
+strlcat() when building montage directory, which could allow heap
+overwrite.</li>
+<li>coders/png.c (RegisterPNGImage): Pass correct size value to
+strlcat(). Under Apple's OS X (and possibly other targets)
+strlcat() writes bytes beyond what it needs to (but within the
+range it is allowed to) causing a crash due to the wrong limit
+value. Fixes SourceForge issue #609 <cite>gm identify foo.png</cite> crashes
+on macOS (v 1.3.32).</li>
+<li>www/Changes.rst: Update ChangeLog links due to new year, and
+1.3.32 release.</li>
+</ul>
+</blockquote>
+<p>2019-06-16 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>coders/bmp.c (WriteBMPImage): Detect arithmetic overflow of
+image_size. Add more tracing. Reduce compilation warnings.
+(EncodeImage): Reduce compilation warnings.
+(WriteBMPImage): Assure that chromaticity uses double-precision
+for multiply before casting to unsigned integer.</li>
+<li>coders/wpg.c (ReallocColormap): Reduce compilation warnings.</li>
+<li>coders/braille.c (WriteBRAILLEImage): Reduce compilation
+warnings.</li>
+<li>coders/dib.c (WriteDIBImage): Detect arithmetic overflow of
+image_size. Reduce compilation warnings.
+(EncodeImage): Reduce compilation warnings.</li>
+<li>coders/locale.c (WriteLOCALEImage): Reduce compilation warnings.</li>
+</ul>
+</blockquote>
+<p>2019-06-15 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>Makefile.am (dist-zstd): Use the maximum possible compression
+level (22) when creating a Zstd-compressed tarball to get close to
+lzip/xz compression levels.</li>
+<li>coders/tiff.c (ReadTIFFImage): Fix typo in initialization of
+'tile' pointer variable.</li>
+<li>version.sh: Updates in preparation for 1.3.32 release.</li>
+</ul>
+</blockquote>
+<p>2019-06-14 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>Makefile.am (release): Add a release target to make it easier to
+produce and sign the release files. Add a zstd-compressed output
+tarball just because we can.</li>
+</ul>
+</blockquote>
+<p>2019-06-12 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>magick/render.c (DrawImage): Fix typo when initializing
+number_coordinates. Somehow GCC and clang let this typo slip by.</li>
+</ul>
+</blockquote>
+<p>2019-06-11 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>coders/dib.c (ReadDIBImage): Preserve PseudoClass opaque
+representation if ICO mask is opaque, otherwise return a
+DirectClass image.</li>
+</ul>
+</blockquote>
+<p>2019-06-10 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>magick/render.c (DrawImage): Detect an error in TracePath() and
+quit rather than forging on.</li>
+</ul>
+</blockquote>
+<p>2019-06-09 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>magick/render.c (DrawImage): Terminate drawing if
+DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
+"graphicsmagick/coder_MVG_fuzzer: Timeout in
+graphicsmagick_coder_MVG_fuzzer".
+(TracePath): Terminate path parsing upon first parsing error.</li>
+</ul>
+</blockquote>
+<p>2019-06-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>coders/txt.c (ReadTXTImage): Use real a new-line character as
+line delimiter rather than 'n' string.</li>
+<li>magick/annotate.c (AnnotateImage): No longer implicitly call
+TranslateText() since this is not suitable for most use-cases and
+causes additional performance impact. The API user can perform
+such translations in advance on the text string using
+TranslateText() if need be. No longer call StringToList() to
+split strings into an array of strings since this can lead to
+unexpected results, and a custom-splitter is more efficient.</li>
+</ul>
+</blockquote>
+<p>2019-06-06 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>magick/render.c (DrawImage): Only support <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax to
+read drawing primitive from a file if we are not already drawing.</li>
+<li>magick/utility.c (TranslateTextEx): Remove support for reading
+from a file using <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax due to security concerns.
+Problem was reported to us by "Battle Furry" via the
+GraphicsMagick security mail alias on June 6, 2019.</li>
+</ul>
+</blockquote>
+<p>2019-06-03 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>magick/utility.c (SetClientFilename): Reduce initialized data
+some more.</li>
+</ul>
+</blockquote>
+<p>2019-06-02 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>magick/nt_base.c: Search for n019003l.pfb (the "Helvetica"-like
+font) rather than fonts.dir since fonts.dir is not present in all
+URW font collections.</li>
+<li>NEWS.txt: Update news.</li>
+</ul>
+</blockquote>
+<p>2019-06-01 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>coders/logo.c: Tidy logo image definitions, and logo image
+output.</li>
+</ul>
+</blockquote>
+<p>2019-05-23 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>coders/mat.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-22 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>magick/animate.c: Reduce initialized static allocations.</li>
+<li>magick/display.c: Reduce initialized static allocations.</li>
+<li>magick/widget.c (MagickSplitNDLTextToList): Add static
+implementation function.</li>
+</ul>
+</blockquote>
+<p>2019-05-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>coders/webp.c (RegisterWEBPImage): Use sprintf to format version
+since snprintf is not available in old Visual Studio.</li>
+</ul>
+</blockquote>
+<p>2019-05-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>
+<ul class="simple">
+<li>coders/dcm.c: Make more data const.</li>
+<li>www/INSTALL-unix.rst: Add documentation for how to install URW
+fonts from various package management systems.</li>
+</ul>
+</blockquote>
+<p>2019-05-18 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>www/authors.rst: Add authorship attribution to Samuel Thibault
+for contributing support for the Braille image format.</li>
+<li>coders/braille.c: Add support for Braille image format by Samuel
+Thibault. Patch submitted via SourceForge patch #59 "Add braille
+image format support.</li>
+</ul>
+</blockquote>
+<p>2019-05-17 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>magick/tempfile.c: Make more data const.</li>
+<li>magick/signature.c: Make more data const.</li>
+<li>magick/quantize.c: Make more data const.</li>
+<li>magick/attribute.c: Make more data const.</li>
+<li>coders/png.c: Make more data const.</li>
+<li>coders/mpeg.c: Make more data const.</li>
+<li>coders/wmf.c: Make more data const.</li>
+<li>coders/tile.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-16 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>magick/enum_strings.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-15 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>magick/magick.c: Make more data const.</li>
+<li>magick/type.c (GetTypeInfoByFamily): Make more data const.</li>
+<li>magick/unix_port.c (MagickGetMMUPageSize): Decrease initialized
+data.</li>
+<li>magick/utility.c (GetPageGeometry): Make more data const.</li>
+<li>coders/pdf.c (WritePDFImage): Allocate working buffer on stack
+and pass as argument to EscapeParenthesis() to eliminate a thread
+safety problem and also reduce BSS size.</li>
+<li>coders/webp.c (RegisterWEBPImage): Fix compiler warning.</li>
+<li>coders/jbig.c (RegisterJBIGImage): Make more data const.</li>
+<li>coders/pict.c (DecodeImage): Allocate output buffer used by
+ExpandBuffer() on the stack rather than as static data private to
+ExpandBuffer(). Eliminates a thread safety problem and also
+reduces BSS size.</li>
+<li>coders/webp.c (RegisterWEBPImage): Reduce BSS size.</li>
+</ul>
+</blockquote>
+<p>2019-05-14 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>coders/jp2.c: Make more data const.</li>
+<li>coders/wmf.c: Make more data const.</li>
+<li>coders/ps.c (WritePSImage): Make more data const.</li>
+<li>coders/ps2.c (WritePS2Image): Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-13 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>magick/static.c: Revert to previous 'name' storage. Callback
+functions in structure block being properly const.</li>
+<li>coders/xpm.c: Make more data const.</li>
+<li>coders/pnm.c: Make more data const.</li>
+<li>coders/palm.c: Make more data const.</li>
+<li>coders/meta.c: Make more data const.</li>
+<li>coders/dcraw.c: Make more data const.</li>
+<li>magick/command.c: Fix compilation problem when HasX11 is not
+defined.</li>
+</ul>
+</blockquote>
+<p>2019-05-12 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>magick/command.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-11 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>coders/webp.c (RegisterWEBPImage): Make more data const.</li>
+<li>coders/svg.c (RegisterSVGImage): Reduce BSS size.</li>
+<li>coders/miff.c (RegisterMIFFImage): Fix version reporting.</li>
+<li>coders/ttf.c (RegisterTTFImage): Fixed reporting of FreeType
+version.</li>
+<li>coders/tiff.c (RegisterTIFFImage): Reduce BSS size.</li>
+<li>coders/sfw.c (ReadSFWImage): Make SFW static data completely
+const.</li>
+<li>coders/ps3.c: Make PS3 static data completely const.</li>
+<li>coders/pict.c: Make PICT static data completely const.</li>
+<li>magick/error.c (ThrowException, ThrowLoggedException): Handle
+the case where some passed character strings refer to existing
+exception character strings. Fixes SourceForge issue #603
+"heap-use-after-free in function ThrowLoggedException of
+magick/error.c".
+(CatchException): Restructure so there is one return point.</li>
+<li>coders/miff.c (ImportRLEPixels): Fix heap overflow caused by a
+typo in the code. Also fix undefined behavior caused by large
+left shifts of an unsigned char. Fixes SourceForge issue #608
+"heap-buffer-overflow in ImportRLEPixels of coders/miff.c.</li>
+</ul>
+</blockquote>
+<p>2019-05-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>coders/bmp.c (ReadBMPImage): Fix subrange/scene handling in
+'ping' mode so it is like the other formats. Only the first frame
+was being enumerated while in 'ping' mode.</li>
+</ul>
+</blockquote>
+<p>2019-05-07 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>NEWS.txt: Update news.</li>
+<li>magick/utility.c (ExpandFilenames): Only expand <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' to a
+list of arguments read from 'filename' if the path <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>'
+does not exist. This fix is made based on an email posting to the
+'graphicsmagick-help' mailing list at SourceForge by "Test User"
+on Tue, 7 May 2019.</li>
+</ul>
+</blockquote>
+<p>2019-05-05 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>magick/colorspace.c: Reorder initialization of colorspace tables
+for a possible performance improvement.</li>
+<li>magick/fx.c (WaveImage): Use float for sin map.</li>
+<li>configure.ac: Test for float versions of math functions.</li>
+<li>magick/gem.c (GenerateDifferentialNoise): Use float versions of
+math functions when available.</li>
+</ul>
+</blockquote>
+<p>2019-05-02 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>www/INSTALL-unix.rst: Expanded configure documentation for
+--with-modules. Added specific configure documentation for
+--with-umem and --with-mtmalloc, which may be useful on
+Solaris-derived systems.</li>
+</ul>
+</blockquote>
+<p>2019-04-23 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>magick/command.c (VersionCommand): Show OpenMP specification
+version corresponding to version enumeration.</li>
+<li>magick/locale.c (GetLocaleMessageFromTag): Eliminate clang
+warning about comparison with a constant value.</li>
+<li>magick/log.c (InitializeLogInfo): Initialize LogInfo log_configured.</li>
+</ul>
+</blockquote>
+<p>2019-04-21 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>magick/magic.c (struct): Ajust StaticMagic definition to be more
+const-friendly.</li>
+<li>magick/color_lookup.c (struct): Adjust StaticColors definition
+to be more const-friendly.</li>
+<li>magick/attribute.c: Ajust tag_table definition to be more
+const-friendly.</li>
+<li>magick/log.c: Allocate LogInfo from heap as we used to do.</li>
+<li>magick/locale.c (GetLocaleMessageFromTag): Adaptations to locale
+coder output changes.</li>
+<li>coders/locale.c (WriteLOCALEImage): Adjust locale coder output
+to be more const.</li>
+</ul>
+</blockquote>
+<p>2019-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>magick/color_lookup.c: Make built-in color tables fully const.</li>
+<li>magick/animate.c: Use MagickXTextViewWidgetNDL() to display help
+text.</li>
+<li>magick/display.c: Use MagickXTextViewWidgetNDL() to display help
+text.</li>
+<li>magick/widget.c (MagickXTextViewWidgetNDL): New private function
+to display multi-line null-delimited text in an X11 widget.</li>
+<li>coders/xwd.c (ReadXWDImage): Added even more XWD header
+validation logic. Addresses problems noted by email from Hongxu
+Chen to the graphicsmagick-security mail alias on Fri, 19 Apr 2019
+and Sat, 20 Apr 2019 and entitled "Multiple crashes (FPE and
+invalid read) when processing XWD files".</li>
+</ul>
+</blockquote>
+<p>2019-04-17 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>coders/xwd.c (ReadXWDImage): Added even more XWD header
+validation logic. Addresses problems noted by email from Hongxu
+Chen to the graphicsmagick-security mail alias on Wed, 17 Apr 2019
+and entitled "Multiple crashes (FPE and invalid read) when
+processing XWD files". Also addresses additional issues noted
+that an attacker could request to allocate an arbitrary amount of
+memory based on ncolors and the claimed header size.</li>
+</ul>
+</blockquote>
+<p>2019-04-14 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>coders/xwd.c (ReadXWDImage): Add more XWD header validation
+logic. Addresses problems noted by email from Hongxu Chen to the
+graphicsmagick-security mail alias on Sun, 14 Apr 2019 and
+entitled "Multiple crashes (FPE and invalid read) when processing
+XWD files".</li>
+</ul>
+</blockquote>
+<p>2019-04-13 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>coders/pdb.c (WritePDBImage): Assure that input scanline is
+cleared in order to cover up some decoder bug. May fix 14215
+"graphicsmagick/coder_PDB_fuzzer: Use-of-uninitialized-value in
+WritePDBImage", which I have not been able to reproduce.</li>
+<li>magick/render.c (DrawPrimitive): Check primitive point x/y
+values for NaN.
+(DrawImage): Fix oss-fuzz issue 14173
+"graphicsmagick/coder_MVG_fuzzer: Integer-overflow in DrawImage".</li>
+<li>magick/pixel_cache.c (SetNexus): Fix oss-fuzz issue 14208
+"graphicsmagick/coder_MVG_fuzzer: Integer-overflow in SetNexus".</li>
+</ul>
+</blockquote>
+<p>2019-04-11 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>magick/display.c: Add even more const declarations.</li>
+<li>coders/mat.c (WriteMATLABImage): Add completely missing error
+handling. Fixes SourceForge issue #604 "heap-buffer-overflow in
+function WriteMATLABImage of coders/mat.c".</li>
+</ul>
+</blockquote>
+<p>2019-04-10 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>coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
+"heap-buffer-overflow in function WritePDBImage of coders/pdb.c".</li>
+<li>magick/widget.c: Add many const declarations.</li>
+<li>magick/display.c: Incorporate and eliminate display.h. Add many
+const declarations.</li>
+<li>magick/animate.c: Incorporate and eliminate animate.h. Add many
+const declarations.</li>
+</ul>
+</blockquote>
+<p>2019-04-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>coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
+bounding box. Fixes SourceForge issue #606 "Division by Zero in
+coders/wmf.c".</li>
+</ul>
+</blockquote>
+<p>2019-04-07 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
+<blockquote>
+<ul class="simple">
+<li>magick/nt_base.c Fix a problem of finding ghostscript fonts.
+Variable "font_dir" was useless and thus removed. No need to copy
+text multiple times. Use const char gs_font_dir[] instead of
+pointer.</li>
+</ul>
+</blockquote>
+<p>2019-04-07 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>coders/xwd.c (ReadXWDImage): Perform more header validations and
+a file size validation in order to reject files with bogus
+headers.
+(WriteXWDImage): Fix SourceForge issue #599
+"heap_buffer_overflow_WRITE in function WriteXWDImage of
+coders/xwd.c".</li>
+</ul>
+</blockquote>
+<p>2019-04-05 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>coders/svg.c (SVGStartElement): Fix stack buffer overflow while
+parsing quoted font family value. Fixes SourceForge issue #600
+"stack-buffer-overflow in function SVGStartElement of
+coders/svg.c".</li>
+<li>coders/miff.c (ReadMIFFImage): Detect end of file while reading
+RLE packets. Fixes SourceForge issue #598 "heap-buffer-overflow
+in function ReadMIFFImage of coders/miff.c".</li>
+</ul>
+</blockquote>
+<p>2019-04-03 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>coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
+reading DirectClass XWD file. Fixes SourceForge issue #597
+"heap-buffer-overflow in function ReadXWDImage of coders/xwd.c".</li>
+</ul>
+</blockquote>
+<p>2019-04-02 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>coders/png.c (ReadMNGImage): Fix small buffer overflow (one
+PixelPacket) of image colormap. Fixes SourceForge issue #596
+"heap-buffer-overflow in function CloneImage of magick/image.c".</li>
+<li>magick/colormap.c (ReallocateImageColormap): New function to
+reallocate an image colormap.</li>
+<li>coders/logo.c: Make more static data const.</li>
+<li>magick/module_aliases.h: Make more static data const.</li>
+<li>magick/static.c: Make more static data const.</li>
+</ul>
+</blockquote>
+<p>2019-04-01 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>magick/log.c (LogMagickEventList): Log elapsed time with
+microsecond precision.</li>
+</ul>
+</blockquote>
+<p>2019-03-31 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>coders/mpc.c (ReadMPCImage): Deal with a profile length of zero,
+or an irrationally large profile length. Fixes SourceForge issue
+#601 "memory leak in function ReadMPCImage of coders/mpc.c ".</li>
+<li>magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
+case that the memory allocation for window->segment_info
+fails. Fixes SourceForge #595 "use allocate memory before null
+check" as pertains to magick/xwindow.c.</li>
+<li>magick/segment.c (Classify): Add check for memory allocation
+failure when allocating cluster array. Fixes SourceForge #595 "use
+allocate memory before null check" as pertains to
+magick/segment.c.</li>
+<li>coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
+null check. Fixes SourceForge #595 "use allocate memory before
+null check" as pertains to coders/pdb.c.</li>
+</ul>
+</blockquote>
+<p>2019-03-30 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>magick/pixel_cache.c (AllocateThreadViewSet): Simplify the image
+view model by adding NexusInfo to the View structure (rather than
+referencing it via a pointer) to lessen the number of required
+per-thread allocations and to improve locality of reference.</li>
+</ul>
+</blockquote>
+<p>2019-03-22 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>coders/wpg.c (WPG1_Palette): Change to a static declaration.</li>
+<li>coders/dcm.c: dicom_info array is now fully in the data segment.</li>
+</ul>
+</blockquote>
+<p>2019-03-18 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>configure.ac: Add support for using the Solaris mtmalloc
+library. This is primarily for testing or as an alternative to
+Solaris umem.
+Stop using posix_memalign() until it is uniformly more mature and
+reliably quick.</li>
+</ul>
+</blockquote>
+<p>2019-03-17 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>magick/pixel_cache.c (SetNexus): Smallest staging-area
+allocation is cache line size so declare it as such.</li>
+<li>magick/fx.c: Functions in the fx module which return a new Image
+should return a null Image if an exception was thrown. Also,
+assure that user has an opportunity to see the exception which was
+thrown.</li>
+<li>magick/error.c (ThrowLoggedException): Throwing an exception is
+now thread-safe.</li>
+<li>magick/pixel_cache-private.h: Moved pixel cache private
+definitions to private header.</li>
+</ul>
+</blockquote>
+<p>2019-03-10 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>magick/pixel_cache.c (SetNexus): Pass x, y, columns, and rows
+rather than a pointer to RectangleInfo. This should be easier to
+inline on modern CPUs.</li>
+</ul>
+</blockquote>
+<p>2019-03-09 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>magick/pixel_cache.c (SetNexus): Cache resource limits in
+CacheInfo rather than repeatedly calling into the resource code in
+order to lessen the overhead of performing resource limit checks
+on the pixel cache views.</li>
+<li>magick/resource.c (AcquireMagickResource): Use a lock for each
+resource in order to lessen contention. Return a maximum 64-bit
+integer value if the resource has not been limited. Previously
+returned -1 in this case but this was not documented.</li>
+</ul>
+</blockquote>
+<p>2019-03-07 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>magick/import.c (ImportViewPixelArea): If range between max and
+min is less than MagickEpsilon, produce a black image rather than
+throwing an exception.</li>
+<li>coders/mat.c (ReadMATImage): Fix memory leak on unexpected end
+of file. Fixes oss-fuzz 13556 "graphicsmagick/coder_MAT_fuzzer:
+Direct-leak in ReadMATImage". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-06 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>coders/mat.c (ReadMATImage): Quit if image scanlines are not
+fully populated due to exception. Fixes oss-fuzz 13530
+"graphicsmagick/coder_MAT_fuzzer: Use-of-uninitialized-value in
+InsertComplexFloatRow". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-04 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>coders/txt.c (ReadTXTImage): Don't start new line if x_max <
+x_min. Avoids calling SetImagePixels() with a width of zero.
+Related to oss-fuzz 13521 "graphicsmagick/coder_TEXT_fuzzer:
+Floating-point-exception in SetNexus". (Credit to OSS-Fuzz)</li>
+<li>magick/pixel_cache.c (SetNexus): Report error for empty region
+rather than crashing due to divide by zero exception. This is a
+new bug due to yesterday's changes. Fixes oss-fuzz 13521
+"graphicsmagick/coder_TEXT_fuzzer: Floating-point-exception in
+SetNexus". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-03 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>design/pixel-cache.dot: Update design dot diagram to remove
+IsNexusInCore and add CompositeCacheNexus.</li>
+<li>magick/pixel_cache.c (SetNexus): Apply resource limits to pixel
+nexus allocations using the same limits (total pixels, width,
+height, memory) as applied to the whole image since some requests
+are directly influenced by the input file. Add yet more tests for
+arithmetic overflow. Whole source module is re-arranged so that
+static functions are in order of dependency so that forward
+prototype declarations are no longer needed. Fixes oss-fuzz 13210
+"graphicsmagick/coder_MVG_fuzzer: Integer-overflow in
+SetNexus". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-02 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>magick/pixel_cache.c (OpenCache): Use unsigned 64-bit value to
+store CacheInfo offset and length as well as for the total pixels
+calculation. Add some more arithmetic overflow detections.</li>
+<li>coders/topol.c (ReadTOPOLImage): Report a corrupt image
+exception "Unexpected end-of-file" if reader encounters end of
+file while reading header rows. Addresses oss-fuzz 7981
+"graphicsmagick/coder_TOPOL_fuzzer: Use-of-uninitialized-value in
+InsertRow". (Credit to OSS-Fuzz)</li>
+<li>coders/mat.c (ReadMATImage): Report a corrupt image exception
+"Unexpected end-of-file" if reader encounters end of file while
+reading scanlines. Also added some helpful traces. Hopefully
+addresses oss-fuzz 13445 "graphicsmagick/coder_MAT_fuzzer:
+Use-of-uninitialized-value in IsGrayImage". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-26 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>magick/image.h ("C"): Include as "magick/image-private.h" as the
+other headers are.
+("C"): Include "magick/image-private.h" inside the protective
+MAGICK_IMPLEMENTATION guard, as it should have been. This error
+broke the oss-fuzz build.</li>
+</ul>
+</blockquote>
+<p>2019-02-24 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>magick/image-private.h (_ImageExtra): Put ImageExtra definition
+in a private header file so that its definition may be accessed
+directly by library internals. Add some accessor macros to
+provide access and update code to use them.</li>
+<li>coders/wpg.c (ReallocColormap): Make sure that there is not a
+heap overwrite if the number of colors has been reduced. Thanks
+to Jaroslav Fojtik for giving me a heads up about this.</li>
+</ul>
+</blockquote>
+<p>2019-02-23 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>magick/monitor.c (MagickMonitorActive): Add new private function
+to test if a progress monitor is active. Update all progress
+monitor code in loops to use this information, while also updating
+code to hopefully address concerns expressed by Hongxu Chen about
+data races on the graphicsmagick-bugs mailing list starting on
+February 6, 2019.</li>
+</ul>
+</blockquote>
+<p>2019-02-21 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>coders/mpc.c (ReadMPCImage): Tally directory length to avoid
+death by strlen().</li>
+<li>coders/miff.c (ReadMIFFImage): Tally directory length to avoid
+death by strlen(). Fixes oss-fuzz 13190
+"graphicsmagick/coder_MIFF_fuzzer: Timeout in
+graphicsmagick_coder_MIFF_fuzzer". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-17 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>coders/svg.c (ReadSVGImage): Don't call xmlCleanupParser()
+in module code since this may cause other libxml users to fail.</li>
+<li>coders/msl.c (ProcessMSLScript): Don't call xmlCleanupParser()
+in module code since this may cause other libxml users to fail.</li>
+<li>magick/render.c (DrawDashPolygon): (DrawDashPolygon): Don't read
+beyond end of dash pattern array. This is a second instance of
+issue identified by SourceForge issue #591. Fixes oss-fuzz 13160
+"graphicsmagick/coder_MVG_fuzzer: Heap-buffer-overflow in
+DrawDashPolygon". The earlier attempt to fix this problem today
+broke dash patterns entirely. (Credit to OSS-Fuzz)</li>
+<li>magick/annotate.c (RenderFreetype): Eliminate memory leak of
+GlyphInfo.image (type FT_Glyph) while rendering some FreeType
+fonts such as the one we use now in the Magick++ test suite.</li>
+</ul>
+</blockquote>
+<p>2019-02-16 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>magick/render.c (DrawDashPolygon): Avoid reading one beyond
+length of dash pattern array, which is terminated by value 0.0.
+Fixes SourceForge issue #591 "Heap buffer overflow in
+DrawDashPolygon when parsing SVG images".
+(DrawPrimitive): Add arithmetic overflow checks when converting
+computed coordinates from 'double' to 'long'.
+(DrawImage): Don't destroy draw_info in graphic_context when
+draw_info has not been allocated yet. Problem reported via email
+by Sami Supperi on Thu, 14 Feb 2019.</li>
+<li>coders/jpeg.c (ReadJPEGImage): JPEG files are observed to
+provide compression ratios as high as 2500 so allow for that.
+Also, the test for "Unreasonable dimensions" delivered yesterday
+was flawed since magick_rows and magick_columns are only set if a
+desired image size was provided. Fixes SourceForge issue 592
+"Non-malicious JPEG file fails with "Unreasonable dimensions"".</li>
+<li>coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
+for images where photometic is PHOTOMETRIC_RGB. Fixes oss-fuzz
+13115 "graphicsmagick/coder_PTIF_fuzzer:
+Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
+OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-15 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>coders/jpeg.c (ReadJPEGImage): Base test for "Unreasonable
+dimensions" on original JPEG dimensions and not the scaled
+dimensions. Fixes SourceForge issue 593 "gm convert: Insufficient
+image data in file when hinting input image".</li>
+</ul>
+</blockquote>
+<p>2019-02-13 Troy Patteson <<a class="reference external" href="mailto:troyp%40ieee.org">troyp<span>@</span>ieee<span>.</span>org</a>></p>
+<blockquote>
+<ul class="simple">
+<li>PerlMagick/Magick.xs (Mogrify): Add decorate argument to Annotate.</li>
+<li>PerlMagick/Magick.xs (Mogrify): Remove reference to undefined
+Annotate argument.</li>
+</ul>
+</blockquote>
+<p>2019-02-12 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>coders/tiff.c (ReadTIFFImage): For planar TIFF, make sure that
+pixels are initialized in case some planes are missing. Fixes
+oss-fuzz 13046 "graphicsmagick/coder_PTIF_fuzzer:
+Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
+OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-11 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>coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
+returning. Similar to ImageMagick CVE-2019-7397 "In ImageMagick
+before 7.0.8-25, several memory leaks exist in WritePDFImage in
+coders/pdf.c.". Thanks to Petr Gajdos for bringing this issue to
+our attention.</li>
+</ul>
+</blockquote>
+<p>2019-02-10 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>coders/wpg.c (ReadWPGImage): Use a different way to reallocate
+the colormap which preserves existing content, but also updates
+image->colors and assures that added palette entries are
+initialized.</li>
+<li>coders/png.c (ReadMNGImage): Bound maximum loop iterations by
+subrange as a primitive means of limiting resource consumption.
+This should finally resolve oss-fuzz 12738
+"graphicsmagick/enhance_fuzzer: Out-of-memory in
+graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)</li>
+<li>coders/tiff.c (ReadTIFFImage): Assure that opacity channel is
+initialized in the RGBAStrippedMethod case. Convert
+'CorruptImageError' encountered while testing for more frames to
+'CorruptImageWarning' so we return the frames already read.
+Second try at fixing oss-fuzz 11896
+"graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
+VerticalFilter".</li>
+<li>coders/dpx.c (AttributeToString): Eliminate clang
+"-Wstring-plus-int" warning observed in oss-fuzz build.</li>
+<li>coders/cineon.c (AttributeToString): Eliminate clang
+"-Wstring-plus-int" warning observed in oss-fuzz build.</li>
+</ul>
+</blockquote>
+<p>2019-02-09 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>coders/pict.c (DecodeImage): Avoide a one-byte over-read of
+pixels heap allocation. The cause of the over-read is not yet
+understood. Fixes oss-fuzz 12019
+"graphicsmagick/coder_PICT_fuzzer: Heap-buffer-overflow in
+ExpandBuffer". (Credit to OSS-Fuzz)</li>
+<li>coders/wpg.c (ReadWPGImage): Assure that all colormap entries
+are initialized. Fixes oss-fuzz 12614
+"graphicsmagick/enhance_fuzzer: Use-of-uninitialized-value in
+EnhanceImage". (Credit to OSS-Fuzz)</li>
+<li>coders/tiff.c (ReadTIFFImage): Make sure that image is in
+DirectClass mode and ignore any claimed colormap when the image is
+read using the RGBAStrippedMethod, RGBATiledMethod, or
+RGBAPuntMethod cases. Fixes oss-fuzz 12195
+"graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
+ExportGrayQuantumType". (Credit to OSS-Fuzz)</li>
+<li>coders/miff.c (ReadMIFFImage): Improve pixel buffer calculations
+to defend against overflow. Assure that zlib and bzlib decode the
+expected number of bytes for a pixel row. Fixes oss-fuzz issue
+12448 "graphicsmagick/coder_MIFF_fuzzer:
+Use-of-uninitialized-value in RGBTransformPackets". (Credit to
+OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-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>coders/png.c (ReadMNGImage): Quit processing and report error
+upon failure to insert MNG background layer. Fixes oss-fuzz 12738
+"graphicsmagick/enhance_fuzzer: Out-of-memory in
+graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-03 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>coders/dib.c (ReadDIBImage, WriteDIBImage): Improve buffer-size
+calculations to guard against buffer overflows. The reader
+version was not as complete as it should have been, whereas the
+writer version did not guard against arithmetic overflow at all.</li>
+<li>coders/bmp.c (ReadBMPImage, WriteBMPImage): Improve buffer-size
+calculations to guard against buffer overflows. This is a
+follow-on fix to the previous fix submitted for SourceForge issue
+#582 "heap-buffer-overflow in ReadBMPImage of bmp.c" which is now
+also identified as CVE-2018-20185.</li>
+<li>www/Hg.rst: Updates to reflect current usage and availability.</li>
+<li>www/authors.rst: Promote Troy Patteson to the active contributor
+category.</li>
+</ul>
+</blockquote>
+<p>2019-02-01 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>magick/version.h.in: Rotate ChangeLog and update copyright
+statements for the new year.</li>
+</ul>
+</blockquote>
+<p>2019-01-30 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>coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
+support WebP 'use_sharp_yuv' option ("if needed, use sharp (and
+slow) RGB->YUV conversion") via <cite>-define webp:use-sharp-yuv=true</cite>.</li>
+</ul>
+</blockquote>
+<p>2019-01-05 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>magick/pixel_cache.c (SetNexus): Merge IsNexusInCore()
+implementation code into SetNexus() and add check for if
+cache_info->pixels is null. Fixes SourceForge issue #588 "Bug in
+IsNexusInCore()".</li>
+<li>configure.ac (DcrawExtraOptions): Request TIFF output from dcraw
+if build supports TIFF format in order to obtain more metadata.
+This allows obtaining some metadata from standard TIFF tags
+(e.g. camera make, model, and dcraw version), and any attached ICC
+profile, but not specifically EXIF data since we don't support
+extracting EXIF data from TIFF yet. Inspired by SourceForge issue
+589 "Identify lack of data (no Exif) in RAW formats".</li>
+</ul>
+</blockquote>
+</div>
+</body>
+</html>
--- /dev/null
+2019-12-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/gradient.c (ReadGRADIENTImage): QueryColorDatabase() only
+ throws a warning so allow the warning to propagate to the user
+ rather than failing to report a useful message at all.
+
+2019-12-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/gradient.c (GradientImage): OpenMP portability requires
+ that loop variable be signed.
+
+2019-12-30 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ - magick/gradient.c: Visual studio does not compile file without
+ this fix.
+
+2019-12-30 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ - VisualMagick\configure\configure.cpp Add option for speed optimisation
+ to achieve better performance.
+
+2019-12-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/version.h.in: Bump copyright years.
+
+ - magick/image.c (DisplayImages): Fix return status. Was
+ returning inverted return status.
+
+ - coders/gradient.c (ReadGRADIENTImage): Support the
+ "gradient:direction" definition to produce produce additional
+ gradient vector directions corresponding to South, North, West,
+ East, NorthWest, NorthEast, SouthWest, and SouthEast. This
+ support is similar to a useful feature added in ImageMagick
+ 6.9.2.5 although there is no claim that the results are identical,
+ even if the resulting images appear to be visually
+ indistinguishable.
+
+ - magick/gradient.c (GradientImage): Add support for using the
+ image 'gravity' attribute to produce additional gradient vector
+ directions corresponding to SouthGravity (the previously-existing
+ default), NorthGravity, WestGravity, EastGravity,
+ NorthWestGravity, NorthEastGravity, SouthWestGravity, and
+ SouthEastGravity. Gradient images are updated to be PseudoClass
+ (color-mapped), if possible.
+
+2019-12-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/gradient.c (GradientImage): Output PseudoClass images if
+ we can.
+
+ - coders/pcx.c (WritePCXImage): Fix heap overflow in PCX writer
+ when bytes per line value overflows its 16-bit storage unit.
+ Fixes SourceForge bug #619 "heap-buffer-overflow in WritePCXImage"
+ reported by Suhwan Song.
+
+ - magick/gradient.c (GradientImage): Gradient levels were still
+ not spot-on. Now they are. Unfortunately, this necessitated
+ re-generating reference test images based on gradient since the
+ gradient output has changed a little bit more than the test error
+ margins allow.
+
+2019-12-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawImage): Test gradient image resource limits
+ using the proper API.
+
+ - magick/resource.c (ResourceInfinity): Fix definition of
+ ResourceInfinity. Due to parenthesis in the wrong place, the
+ defined value was -1 rather than the maximum range value. The
+ effect of this is that GetMagickResource() would return -1 rather
+ than the maximum range value for the return type as documented.
+ Regression was added on Saturday, March 09, 2019 in the 1.3.32
+ release via changeset 15927:a5318823758c.
+
+ - tests/rwfile.c (main): Allow Ghostscript supported formats to be
+ a bit lossy.
+
+ - tests/rwblob.c (main): Allow Ghostscript supported formats to be
+ a bit lossy.
+
+ - magick/gradient.c (GradientImage): Compute blending alpha with
+ double precision for more precision.
+
+2019-12-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - NEWS.txt: Updates in preparation for 1.3.34 release.
+
+2019-12-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - NEWS.txt: Update with changes since the last GM release.
+
+ - coders/png.c (png\_read\_raw\_profile): Use size\_t type to store
+ profile length and 'nibbles'. Use safer way to test for profile
+ buffer overflow.
+ (ReadOnePNGImage): Use size\_t type to store 'ping\_rowbytes',
+ 'length', and 'row\_offset'. Check png\_pixels allocation for
+ arithemetic overflow when computing the required allocation size.
+
+ - coders/tiff.c (WriteNewsProfile): Use size\_t type to store
+ profile length.
+
+ - coders/pict.c (WritePICTImage): Avoid 'alloc-size-larger-than'
+ warning from GCC when allocating row\_bytes.
+
+2019-12-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - tiff/libtiff/tiffconf.h: Add standard/common libtiff 'SUPPORT'
+ options which are used in full-fledged Autoconf/Cmake libtiff
+ builds but were missing from the Visual C template file. In
+ particular, WebP is now supported and JBIG is somewhat supported.
+
+ - VisualMagick/jbig/libjbig/LIBRARY.txt (EXCLUDE): Remove
+ tstcodec85.c from JBIG library build.
+
+ - VisualMagick/configure/configure.cpp: Add JBIG library to
+ include path when building libraries. Add WebP as a dependency
+ when building libtiff.
+
+2019-12-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/nt\_base.h ("C"): Assume that float versions of functions
+ became available in Visual Studio 2008.
+
+2019-12-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/log.c (InitializeLogInfo): Using the compiled-in
+ defaults, always log to stderr by default, even under Microsoft
+ Windows. The logging output may then be diverted to
+ 'win32eventlog' as soon as a log.mgk file is loaded if that is
+ desired. This should not be much of a problem because loading a
+ log.mgk file is the first thing that the library attempts to do.
+ This change is made due to users and developers being baffled at
+ not seeing any log output due to the log output going to the (very
+ unfriendly) Windows application log.
+
+ - webp: libwebp is updated to the 1.0.3 release.
+
+2019-12-15 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ - magick/nt\_base.c Fix user only installation of Ghostscript.
+
+2019-12-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - rungm.sh.in (DIRSEP): DIRSEP should always use Unix conventions for
+ Autotools-based builds.
+
+ - magick/module.h ("C"): Eliminiate redundant and conflicting
+ ListModuleInfo() prototype.
+
+ - coders/miff.c (ReadMIFFImage): Eliminate warnings in trace
+ statements.
+
+ - coders/dib.c (DecodeImage): Eliminate warnings in trace
+ statements.
+
+ - coders/bmp.c (DecodeImage): Eliminate warnings in trace
+ statements.
+
+ - magick/studio.h (SupportMagickModules): Fix the preprocessor
+ logic controlling SupportMagickModules, which became broken for
+ GCC MinGW-based builds starting in the 1.3.29 release when a
+ "static" module loader was implemented. Due to an error in the
+ preprocessor logic, only the "modules" based build was working for
+ MinGW. Much thanks to Giovanni Remigi for making us aware of this
+ issue.
+
+2019-12-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pict.c (WritePICTImage): Throw a writer exception if the
+ PICT width limit is exceeded. Fixes SourceForge issue 617
+ "heap-buffer-overflow in function EncodeImage of coders/pict.c".
+
+2019-12-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - jbig: jbigkit is updated to 2.1 release.
+
+ - libxml: libxml2 is updated to 2.9.10 release.
+
+ - bzlib: bzip is updated to 1.0.8 release.
+
+ - zlib: zlib is updated to 1.2.11 release.
+
+ - png: libpng is updated to 1.6.37 release.
+
+2019-12-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - lcms: lcms2 is updated to 2.9 release.
+
+ - tiff: libtiff is updated to 4.1.0 release.
+
+2019-11-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawPatternPath): Don't leak memory if
+ fill\_pattern or stroke\_pattern of cloned draw\_info are not null.
+ Fixes oss-fuzz issue 18948 "graphicsmagick:coder\_MVG\_fuzzer:
+ Indirect-leak in CloneImage".
+ (PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
+ memory.
+
+2019-11-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
+ 17986 "graphicsmagick:coder\_JPG\_fuzzer: Heap-buffer-overflow in
+ GenerateEXIFAttribute". This problem likely only happens in
+ 32-bit builds.
+
+2019-11-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (ReadMNGImage): Only magnify the image if the
+ requested magnification methods are supported.
+
+2019-11-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/compress.c (HuffmanDecodeImage): Fix signed overflow on
+ range check which leads to heap overflow in 32-bit
+ applications. Requires a relatively large file input compared with
+ typical fuzzer files (greater than a megabyte) to trigger.
+ Problem reported to the graphicsmagick-security mail address by
+ Justin Tripp on 2019-11-13.
+ (Ascii85Tuple): Fix thread safety issue by requiring caller to
+ pass in tuple buffer as an argument and having callers allocate
+ tuple buffer on the stack.
+
+2019-11-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/bit\_stream.c: Add restrict declarations to slightly
+ improve performance and decrease code size.
+
+ - TclMagick/pkgIndex.tcl: Incorporate recommendations from third
+ problem noted in SourceForge issue #420 "TclMagick issues and
+ patch". This is supposed to help support using an uninstalled
+ GraphicsMagick and allow the installation path to contain a space.
+
+ - wand/magick\_wand.c (MagickClearException): Destroy any existing
+ exception info before re-initializing the exception info or else
+ there will be a memory leak.
+
+ - TclMagick/generic/libttkcommon.c (myMagickError): Clear
+ exception from the Wand after it has been reported. Addresses the
+ fourth problem noted by SourceForge issue #420 "TclMagick issues
+ and patch". However, MagickClearException() already clears an
+ exception in the Wand, so a new function is not needed.
+
+ - TclMagick/unix/m4/tcl.m4: Change hard-coded INSTALL path to
+ point to config/install-sh. Re-generated/updated Autotools stuff
+ by executing the genconf.sh script. Addresses the first problem
+ noted by SourceForge issue #420 "TclMagick issues and patch".
+
+2019-11-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (SetNexus): Eliminate warning about
+ possibly uninitialized variable from primordial GCC 3.4.3.
+
+ - magick/render.c (ConvertPrimitiveToPath): Eliminate warning that
+ IsClosedSubPath might be used uninitialized.
+
+ - magick/common.h ("MAGICK\_FALLTHROUGH"): Added a
+ MAGICK\_FALLTHROUGH macro to support the GCC/Clang fallthrough
+ attribute when the time comes again that it would be useful.
+
+2019-10-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pcx.c (ReadPCXImage): Verify that pixel region is not
+ negative. Assure that opacity channel is initialized to
+ opaqueOpacity. Update DirectClass representation while
+ PseudoClass representation is updated. Improve read performance
+ with uncompressed PCX.
+
+2019-10-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/xpm.c (ReadXPMImage): Image properties are expected to
+ appear within the first 512 bytes of the XPM file header. fixes
+ oss-fuzz 18267 "graphicsmagick:coder\_PICON\_fuzzer: Timeout in
+ coder\_PICON\_fuzzer".
+
+2019-10-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - configure.ac: Fix tcmalloc configuration report.
+
+2019-10-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/wpg.c (ReadWPGImage): Implement subimage/subrange
+ support.
+
+ - coders/mat.c (ReadMATImage, ReadMATImageV4): Implement
+ subimage/subrange support. Should resolve oss-fuzz 14999
+ "graphicsmagick/coder\_MAT\_fuzzer: Out-of-memory in
+ graphicsmagick\_coder\_MAT\_fuzzer".
+
+ - coders/tiff.c (TIFFMapBlob): Fix compile problem if
+ LOG\_TIFF\_BLOB\_IO is defined.
+
+ - coders/wpg.c (ExtractPostscript): Improve performance. Avoid
+ temporary files if possible. Avoid additional memory allocations
+ if possible. Should address oss-fuzz issue 18173
+ "graphicsmagick:enhance\_fuzzer: Timeout in enhance\_fuzzer" and
+ oss-fuzz issue 17714 "graphicsmagick:coder\_WPG\_fuzzer: Timeout in
+ coder\_WPG\_fuzzer".
+
+2019-10-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pnm.c (PNMInteger): Place a generous arbitrary limit on
+ the amount of PNM comment text to avoid denial of service
+ opportunity. Fixes oss-fuzz 18162 "Timeout · coder\_PNM\_fuzzer".
+
+2019-10-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/dps.c (ReadDPSImage): Fix memory leak when OpenBlob()
+ reports failure. Same as ImageMagick CVE CVE-2019-16709.
+
+2019-09-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/attribute.c (GenerateEXIFAttribute): Skip
+ unsupported/invalid format 0. Fixes oss-fuzz issue 17597
+ "graphicsmagick:coder\_SFW\_fuzzer: Heap-buffer-overflow in
+ GenerateEXIFAttribute".
+
+2019-09-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - fuzzing/oss-fuzz-build.sh: Change by Alex Gaynor so that the
+ correct oss-fuzz fuzzing engine should be used.
+
+2019-09-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/static.c (OpenModule): Static module loader should use
+ upper-cased magick string when searching for a module alias.
+ Fixes SourceForge issue #613 "static module loader is still
+ case-sensitive".
+
+2019-09-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - configure.ac: Report status of zstd (FaceBook Zstandard)
+ compression in configuration summary.
+
+2019-09-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (TraceArcPath): Substitute a lineto command when
+ tracing arc is impossible. Fixes oss-fuzz 10765
+ "graphicsmagick/coder\_MVG\_fuzzer: Divide-by-zero in TraceArcPath".
+
+2019-09-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (png\_read\_raw\_profile): Fix validation of raw
+ profile length. Fixes oss-fuzz 16906
+ "graphicsmagick:coder\_ICO\_fuzzer: Out-of-memory in
+ graphicsmagick\_coder\_ICO\_fuzzer".
+
+ - coders/wpg.c (ReallocColormap): Avoid dereferencing a null
+ pointer if image->colormap is null. Fixes oss-fuzz 17004
+ "graphicsmagick:coder\_WPG\_fuzzer: Null-dereference READ in
+ ReallocColormap".
+
+2019-09-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/memory.c (MagickRealloc): Add a note that the behavior of
+ this function is as described for BSD reallocf(3), which is now
+ appearing in Linux's GNU libc and elsewhere.
+
+2019-09-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - www/OpenMP.rst: Document the significant OpenMP speed-up which
+ may be obtained by using an alternate memory allocation library.
+ Currently 'tcmalloc', 'mtmalloc', and 'umem' are supported as
+ options.
+
+ - www/INSTALL-unix.rst: Document new --with-tcmalloc option to
+ enable using Google gperftools tcmalloc library.
+
+ - configure.ac: Add support for using Google gperftools tcmalloc
+ library via the --with-tcmalloc option.
+
+ - scripts/rst2htmldeco.py: Port to Python 3 syntax and require at
+ least Python 2.6.
+
+ - scripts/relpath.py: Port to Python 3 syntax and require
+ at least Python 2.6.
+
+ - scripts/html\_fragments.py: Port to Python 3 syntax and require
+ at least Python 2.6.
+
+ - scripts/format\_c\_api\_doc.py: Port to Python 3 syntax and require
+ at least Python 2.6.
+
+2019-08-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - doc/GraphicsMagick.imdoc: Document gm utility exit status codes.
+
+2019-08-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (PRIMITIVE\_INFO\_POINTS\_MAX): SIZE\_MAX apparently
+ rounds up by one when cast to a double on 64-bit systems. Due to
+ this, and in order to set more rational implementation limits, add
+ a PRIMITIVE\_INFO\_POINTS\_MAX definition which computes and
+ constrains the maximum number of PrimitiveInfo entries allowed.
+
+2019-08-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/attribute.c (GenerateEXIFAttribute): Check that we are
+ not being directed to read an IFD that we are already parsing and
+ quit in order to avoid a loop. Addresses oss-fuzz 15753
+ "graphicsmagick/coder\_JPEG\_fuzzer: Timeout in
+ graphicsmagick\_coder\_JPEG\_fuzzer" and 16068
+ "graphicsmagick/coder\_SFW\_fuzzer: Timeout in
+ graphicsmagick\_coder\_SFW\_fuzzer".
+
+ - tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
+ irritating GCC 9 "\_\_builtin\_strncpy' output may be truncated"
+ warnings due to copying MaxTextExtent-1 characters. Instead
+ request copying all of the characters and also assure that string
+ is still null terminated.
+
+ - doc/environment.imdoc: Update documentation pertaining to HOME
+ and MAGICK\_DEBUG environment variables.
+
+2019-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/log.c (DestroyLogInfo): Only output text to terminate an
+ XML format log file if XML format is active.
+
+2019-08-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (ExtractTokensBetweenPushPop): Previous fix for
+ non-terminal loop was broken by a last-minute untested edit.
+ Finally addresses oss-fuzz 15318 "graphicsmagick/coder\_MVG\_fuzzer:
+ Timeout in graphicsmagick\_coder\_MVG\_fuzzer".
+
+2019-08-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - fuzzing/utils.cc (MemoryResource): Lessen the memory limit used
+ for oss-fuzz testing in order to provide more headroom and margin
+ for error.
+
+ - magick/render.c (TraceBezier): Detect arithmetic overflow and
+ return errors via normal error path rather than exiting. Fixes
+ oss-fuzz 16450 "graphicsmagick:coder\_MVG\_fuzzer: Unexpected-exit
+ in DefaultFatalErrorHandler".
+ (PrimitiveInfoRealloc): Implement more paranoid code related to
+ primitive allocation.
+
+2019-08-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawStrokePolygon): Handle case where
+ TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
+ "graphicsmagick/coder\_MVG\_fuzzer: ASSERT: primitive\_info !=
+ (PrimitiveInfo \*) NULL".
+ (DrawDashPolygon): Handle case where DrawStrokePolygon() returns
+ MagickFail. Also needed to address oss-fuzz 15516, since otherwise
+ test-cases run for a very long time.
+ (ExtractTokensBetweenPushPop): Fix non-terminal parsing loop.
+ Addresses oss-fuzz 15318 "graphicsmagick/coder\_MVG\_fuzzer: Timeout
+ in graphicsmagick\_coder\_MVG\_fuzzer".
+
+2019-08-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/memory.h (MagickMallocAlignedArray): Add function
+ attributes for added value and to quench GCC 9 warning with
+ special build options enabled.
+
+ - magick/deprecate.h (AcquireMemory): Add more function attributes
+ to quench GCC 9 warning with special build options enabled.
+
+ - magick/attribute.c (GenerateEXIFAttribute): Fix compilation
+ warning in 32-bit build.
+
+ - coders/dpx.c (AttributeToString): Eliminate annoying warnings
+ from GCC 9, although the code was correct.
+
+ - coders/msl.c (MSLStartElement): Fix defective opacity percentage
+ code revealed by GCC 9 warning.
+
+2019-08-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (ReadMNGImage): Skip coalescing layers if there is
+ only one layer. Fixes oss-fuzz 16274
+ "graphicsmagick/coder\_MNG\_fuzzer: Unexpected-exit in
+ DefaultFatalErrorHandler".
+
+2019-08-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (ReadPNGImage): Post-processing to convert the
+ image type in the PNG reader based on a specified magick prefix
+ string is now disabled. This can (and should) be done after the
+ image has been returned. Fixes oss-fuzz 16386
+ "graphicsmagick:coder\_PNG8\_fuzzer: Timeout in
+ graphicsmagick\_coder\_PNG8\_fuzzer".
+
+2019-07-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - NEWS.txt: Updates in preparation for 1.3.33 release.
+
+2019-07-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - NEWS.txt: Updated NEWS to reflect updates since last release.
+
+2019-07-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (WriteOnePNGImage): Fix saving to palette when
+ image has an alpha channel but no color is marked as transparent.
+ Patch submitted by Przemysław Sobala via SourceForge patch #61
+ "WriteOnePNGImage(): Fix saving to palette when image has an alpha
+ channel but no color is marked as transparent".
+
+ - doc/options.imdoc (characters): Fix -format documentation to
+ reflect that '%r' returns the image type. Patch submitted by
+ Przemysław Sobala via SourceForge patch #60 "Fix documentation
+ typo".
+
+2019-07-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/tempfile.c (AcquireTemporaryFileDescriptor): Fix
+ compilation under Cygwin. Patch by Marco Atzeri and submitted via
+ email to the graphicsmagick-help mailing list on Fri, 5 Jul 2019.
+
+2019-06-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/attribute.c (GenerateEXIFAttribute): Added range checks
+ and tracing. Fixes oss-fuzz 14998
+ "graphicsmagick/coder\_JPEG\_fuzzer: Heap-buffer-overflow in
+ Read32s". This is a tiny read overflow.
+
+ - coders/miff.c (ReadMIFFImage): Similar fix as to mpc.c
+
+ - coders/mpc.c (ReadMPCImage): Fix faulty signed overflow logic
+ for profiles[i].length which still allowed overflow. Fixes
+ oss-fuzz issue 15190 "graphicsmagick/coder\_MPC\_fuzzer:
+ Out-of-memory in graphicsmagick\_coder\_MPC\_fuzzer".
+
+ - doc/options.imdoc: Add notes about security hazards due to
+ commands which support a '@filename' syntax.
+
+ - www/security.rst: Add notes about security hazards due to
+ commands which support a '@filename' syntax.
+
+2019-06-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawImage): Assure that 'token' is initialized.
+ Fixes oss-fuzz issue 14897 "graphicsmagick/coder\_MVG\_fuzzer:
+ Use-of-uninitialized-value in DrawImage".
+
+ - magick/animate.c (MagickXAnimateImages): Fix memory leak of
+ scene\_info.pixels.
+
+ - magick/display.c (MagickXDisplayImage): Fix heap overwrite of
+ windows->image.name and windows->image.icon\_name buffers. It
+ appears that the code assumed that CloneString() would always
+ allocated a string at least MaxTextExtent in size. I assume that
+ this issue has existed for a very long time since CloneString()
+ was re-written many years ago.
+
+ - coders/caption.c (ReadCAPTIONImage): The CAPTION reader did not
+ appear to work at all any more. Now it works again, but still not
+ very well.
+
+ - magick/command.c: Re-implement '@' file inclusion support for
+ -comment, -draw, -format, and -label which was removed for the
+ 1.3.32 release. Note that arguments from untrusted sources will
+ still need to be sanitized to detect attempts to subvert this
+ feature to access file data, but this feature has always been
+ supported by GraphicsMagick and it originated early in the
+ development of ImageMagick.
+
+2019-06-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/utility.c (MagickStrlCat, MagickStrlCpy): Add debug
+ checks enabled by MAGICK\_STRL\_CHECK.
+
+ - magick/montage.c (MontageImages): Fix wrong length argument to
+ strlcat() when building montage directory, which could allow heap
+ overwrite.
+
+ - coders/png.c (RegisterPNGImage): Pass correct size value to
+ strlcat(). Under Apple's OS X (and possibly other targets)
+ strlcat() writes bytes beyond what it needs to (but within the
+ range it is allowed to) causing a crash due to the wrong limit
+ value. Fixes SourceForge issue #609 `gm identify foo.png` crashes
+ on macOS (v 1.3.32).
+
+ - www/Changes.rst: Update ChangeLog links due to new year, and
+ 1.3.32 release.
+
+2019-06-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/bmp.c (WriteBMPImage): Detect arithmetic overflow of
+ image\_size. Add more tracing. Reduce compilation warnings.
+ (EncodeImage): Reduce compilation warnings.
+ (WriteBMPImage): Assure that chromaticity uses double-precision
+ for multiply before casting to unsigned integer.
+
+ - coders/wpg.c (ReallocColormap): Reduce compilation warnings.
+
+ - coders/braille.c (WriteBRAILLEImage): Reduce compilation
+ warnings.
+
+ - coders/dib.c (WriteDIBImage): Detect arithmetic overflow of
+ image\_size. Reduce compilation warnings.
+ (EncodeImage): Reduce compilation warnings.
+
+ - coders/locale.c (WriteLOCALEImage): Reduce compilation warnings.
+
+2019-06-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - Makefile.am (dist-zstd): Use the maximum possible compression
+ level (22) when creating a Zstd-compressed tarball to get close to
+ lzip/xz compression levels.
+
+ - coders/tiff.c (ReadTIFFImage): Fix typo in initialization of
+ 'tile' pointer variable.
+
+ - version.sh: Updates in preparation for 1.3.32 release.
+
+2019-06-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - Makefile.am (release): Add a release target to make it easier to
+ produce and sign the release files. Add a zstd-compressed output
+ tarball just because we can.
+
+2019-06-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawImage): Fix typo when initializing
+ number\_coordinates. Somehow GCC and clang let this typo slip by.
+
+2019-06-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/dib.c (ReadDIBImage): Preserve PseudoClass opaque
+ representation if ICO mask is opaque, otherwise return a
+ DirectClass image.
+
+2019-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawImage): Detect an error in TracePath() and
+ quit rather than forging on.
+
+2019-06-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawImage): Terminate drawing if
+ DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
+ "graphicsmagick/coder\_MVG\_fuzzer: Timeout in
+ graphicsmagick\_coder\_MVG\_fuzzer".
+ (TracePath): Terminate path parsing upon first parsing error.
+
+2019-06-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/txt.c (ReadTXTImage): Use real a new-line character as
+ line delimiter rather than '\n' string.
+
+ - magick/annotate.c (AnnotateImage): No longer implicitly call
+ TranslateText() since this is not suitable for most use-cases and
+ causes additional performance impact. The API user can perform
+ such translations in advance on the text string using
+ TranslateText() if need be. No longer call StringToList() to
+ split strings into an array of strings since this can lead to
+ unexpected results, and a custom-splitter is more efficient.
+
+2019-06-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawImage): Only support '@filename' syntax to
+ read drawing primitive from a file if we are not already drawing.
+
+ - magick/utility.c (TranslateTextEx): Remove support for reading
+ from a file using '@filename' syntax due to security concerns.
+ Problem was reported to us by "Battle Furry" via the
+ GraphicsMagick security mail alias on June 6, 2019.
+
+2019-06-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/utility.c (SetClientFilename): Reduce initialized data
+ some more.
+
+2019-06-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/nt\_base.c: Search for n019003l.pfb (the "Helvetica"-like
+ font) rather than fonts.dir since fonts.dir is not present in all
+ URW font collections.
+
+ - NEWS.txt: Update news.
+
+2019-06-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/logo.c: Tidy logo image definitions, and logo image
+ output.
+
+2019-05-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/mat.c: Make more data const.
+
+2019-05-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/animate.c: Reduce initialized static allocations.
+
+ - magick/display.c: Reduce initialized static allocations.
+
+ - magick/widget.c (MagickSplitNDLTextToList): Add static
+ implementation function.
+
+2019-05-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/webp.c (RegisterWEBPImage): Use sprintf to format version
+ since snprintf is not available in old Visual Studio.
+
+2019-05-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/dcm.c: Make more data const.
+
+ - www/INSTALL-unix.rst: Add documentation for how to install URW
+ fonts from various package management systems.
+
+2019-05-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - www/authors.rst: Add authorship attribution to Samuel Thibault
+ for contributing support for the Braille image format.
+
+ - coders/braille.c: Add support for Braille image format by Samuel
+ Thibault. Patch submitted via SourceForge patch #59 "Add braille
+ image format support.
+
+2019-05-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/tempfile.c: Make more data const.
+
+ - magick/signature.c: Make more data const.
+
+ - magick/quantize.c: Make more data const.
+
+ - magick/attribute.c: Make more data const.
+
+ - coders/png.c: Make more data const.
+
+ - coders/mpeg.c: Make more data const.
+
+ - coders/wmf.c: Make more data const.
+
+ - coders/tile.c: Make more data const.
+
+2019-05-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/enum\_strings.c: Make more data const.
+
+2019-05-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/magick.c: Make more data const.
+
+ - magick/type.c (GetTypeInfoByFamily): Make more data const.
+
+ - magick/unix\_port.c (MagickGetMMUPageSize): Decrease initialized
+ data.
+
+ - magick/utility.c (GetPageGeometry): Make more data const.
+
+ - coders/pdf.c (WritePDFImage): Allocate working buffer on stack
+ and pass as argument to EscapeParenthesis() to eliminate a thread
+ safety problem and also reduce BSS size.
+
+ - coders/webp.c (RegisterWEBPImage): Fix compiler warning.
+
+ - coders/jbig.c (RegisterJBIGImage): Make more data const.
+
+ - coders/pict.c (DecodeImage): Allocate output buffer used by
+ ExpandBuffer() on the stack rather than as static data private to
+ ExpandBuffer(). Eliminates a thread safety problem and also
+ reduces BSS size.
+
+ - coders/webp.c (RegisterWEBPImage): Reduce BSS size.
+
+2019-05-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/jp2.c: Make more data const.
+
+ - coders/wmf.c: Make more data const.
+
+ - coders/ps.c (WritePSImage): Make more data const.
+
+ - coders/ps2.c (WritePS2Image): Make more data const.
+
+2019-05-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/static.c: Revert to previous 'name' storage. Callback
+ functions in structure block being properly const.
+
+ - coders/xpm.c: Make more data const.
+
+ - coders/pnm.c: Make more data const.
+
+ - coders/palm.c: Make more data const.
+
+ - coders/meta.c: Make more data const.
+
+ - coders/dcraw.c: Make more data const.
+
+ - magick/command.c: Fix compilation problem when HasX11 is not
+ defined.
+
+2019-05-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/command.c: Make more data const.
+
+2019-05-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/webp.c (RegisterWEBPImage): Make more data const.
+
+ - coders/svg.c (RegisterSVGImage): Reduce BSS size.
+
+ - coders/miff.c (RegisterMIFFImage): Fix version reporting.
+
+ - coders/ttf.c (RegisterTTFImage): Fixed reporting of FreeType
+ version.
+
+ - coders/tiff.c (RegisterTIFFImage): Reduce BSS size.
+
+ - coders/sfw.c (ReadSFWImage): Make SFW static data completely
+ const.
+
+ - coders/ps3.c: Make PS3 static data completely const.
+
+ - coders/pict.c: Make PICT static data completely const.
+
+ - magick/error.c (ThrowException, ThrowLoggedException): Handle
+ the case where some passed character strings refer to existing
+ exception character strings. Fixes SourceForge issue #603
+ "heap-use-after-free in function ThrowLoggedException of
+ magick/error.c".
+ (CatchException): Restructure so there is one return point.
+
+ - coders/miff.c (ImportRLEPixels): Fix heap overflow caused by a
+ typo in the code. Also fix undefined behavior caused by large
+ left shifts of an unsigned char. Fixes SourceForge issue #608
+ "heap-buffer-overflow in ImportRLEPixels of coders/miff.c.
+
+2019-05-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/bmp.c (ReadBMPImage): Fix subrange/scene handling in
+ 'ping' mode so it is like the other formats. Only the first frame
+ was being enumerated while in 'ping' mode.
+
+2019-05-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - NEWS.txt: Update news.
+
+ - magick/utility.c (ExpandFilenames): Only expand '@filename' to a
+ list of arguments read from 'filename' if the path '@filename'
+ does not exist. This fix is made based on an email posting to the
+ 'graphicsmagick-help' mailing list at SourceForge by "Test User"
+ on Tue, 7 May 2019.
+
+2019-05-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/colorspace.c: Reorder initialization of colorspace tables
+ for a possible performance improvement.
+
+ - magick/fx.c (WaveImage): Use float for sin map.
+
+ - configure.ac: Test for float versions of math functions.
+
+ - magick/gem.c (GenerateDifferentialNoise): Use float versions of
+ math functions when available.
+
+2019-05-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - www/INSTALL-unix.rst: Expanded configure documentation for
+ --with-modules. Added specific configure documentation for
+ --with-umem and --with-mtmalloc, which may be useful on
+ Solaris-derived systems.
+
+2019-04-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/command.c (VersionCommand): Show OpenMP specification
+ version corresponding to version enumeration.
+
+ - magick/locale.c (GetLocaleMessageFromTag): Eliminate clang
+ warning about comparison with a constant value.
+
+ - magick/log.c (InitializeLogInfo): Initialize LogInfo log\_configured.
+
+2019-04-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/magic.c (struct): Ajust StaticMagic definition to be more
+ const-friendly.
+
+ - magick/color\_lookup.c (struct): Adjust StaticColors definition
+ to be more const-friendly.
+
+ - magick/attribute.c: Ajust tag\_table definition to be more
+ const-friendly.
+
+ - magick/log.c: Allocate LogInfo from heap as we used to do.
+
+ - magick/locale.c (GetLocaleMessageFromTag): Adaptations to locale
+ coder output changes.
+
+ - coders/locale.c (WriteLOCALEImage): Adjust locale coder output
+ to be more const.
+
+2019-04-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/color\_lookup.c: Make built-in color tables fully const.
+
+ - magick/animate.c: Use MagickXTextViewWidgetNDL() to display help
+ text.
+
+ - magick/display.c: Use MagickXTextViewWidgetNDL() to display help
+ text.
+
+ - magick/widget.c (MagickXTextViewWidgetNDL): New private function
+ to display multi-line null-delimited text in an X11 widget.
+
+ - coders/xwd.c (ReadXWDImage): Added even more XWD header
+ validation logic. Addresses problems noted by email from Hongxu
+ Chen to the graphicsmagick-security mail alias on Fri, 19 Apr 2019
+ and Sat, 20 Apr 2019 and entitled "Multiple crashes (FPE and
+ invalid read) when processing XWD files".
+
+2019-04-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/xwd.c (ReadXWDImage): Added even more XWD header
+ validation logic. Addresses problems noted by email from Hongxu
+ Chen to the graphicsmagick-security mail alias on Wed, 17 Apr 2019
+ and entitled "Multiple crashes (FPE and invalid read) when
+ processing XWD files". Also addresses additional issues noted
+ that an attacker could request to allocate an arbitrary amount of
+ memory based on ncolors and the claimed header size.
+
+2019-04-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/xwd.c (ReadXWDImage): Add more XWD header validation
+ logic. Addresses problems noted by email from Hongxu Chen to the
+ graphicsmagick-security mail alias on Sun, 14 Apr 2019 and
+ entitled "Multiple crashes (FPE and invalid read) when processing
+ XWD files".
+
+2019-04-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pdb.c (WritePDBImage): Assure that input scanline is
+ cleared in order to cover up some decoder bug. May fix 14215
+ "graphicsmagick/coder\_PDB\_fuzzer: Use-of-uninitialized-value in
+ WritePDBImage", which I have not been able to reproduce.
+
+ - magick/render.c (DrawPrimitive): Check primitive point x/y
+ values for NaN.
+ (DrawImage): Fix oss-fuzz issue 14173
+ "graphicsmagick/coder\_MVG\_fuzzer: Integer-overflow in DrawImage".
+
+ - magick/pixel\_cache.c (SetNexus): Fix oss-fuzz issue 14208
+ "graphicsmagick/coder\_MVG\_fuzzer: Integer-overflow in SetNexus".
+
+2019-04-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/display.c: Add even more const declarations.
+
+ - coders/mat.c (WriteMATLABImage): Add completely missing error
+ handling. Fixes SourceForge issue #604 "heap-buffer-overflow in
+ function WriteMATLABImage of coders/mat.c".
+
+2019-04-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
+ "heap-buffer-overflow in function WritePDBImage of coders/pdb.c".
+
+ - magick/widget.c: Add many const declarations.
+
+ - magick/display.c: Incorporate and eliminate display.h. Add many
+ const declarations.
+
+ - magick/animate.c: Incorporate and eliminate animate.h. Add many
+ const declarations.
+
+2019-04-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
+ bounding box. Fixes SourceForge issue #606 "Division by Zero in
+ coders/wmf.c".
+
+2019-04-07 Fojtik Jaroslav <JaFojtik@seznam.cz>
+
+ - magick/nt\_base.c Fix a problem of finding ghostscript fonts.
+ Variable "font\_dir" was useless and thus removed. No need to copy
+ text multiple times. Use const char gs\_font\_dir[] instead of
+ pointer.
+
+2019-04-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/xwd.c (ReadXWDImage): Perform more header validations and
+ a file size validation in order to reject files with bogus
+ headers.
+ (WriteXWDImage): Fix SourceForge issue #599
+ "heap\_buffer\_overflow\_WRITE in function WriteXWDImage of
+ coders/xwd.c".
+
+2019-04-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/svg.c (SVGStartElement): Fix stack buffer overflow while
+ parsing quoted font family value. Fixes SourceForge issue #600
+ "stack-buffer-overflow in function SVGStartElement of
+ coders/svg.c".
+
+ - coders/miff.c (ReadMIFFImage): Detect end of file while reading
+ RLE packets. Fixes SourceForge issue #598 "heap-buffer-overflow
+ in function ReadMIFFImage of coders/miff.c".
+
+2019-04-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
+ reading DirectClass XWD file. Fixes SourceForge issue #597
+ "heap-buffer-overflow in function ReadXWDImage of coders/xwd.c".
+
+2019-04-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (ReadMNGImage): Fix small buffer overflow (one
+ PixelPacket) of image colormap. Fixes SourceForge issue #596
+ "heap-buffer-overflow in function CloneImage of magick/image.c".
+
+ - magick/colormap.c (ReallocateImageColormap): New function to
+ reallocate an image colormap.
+
+ - coders/logo.c: Make more static data const.
+
+ - magick/module\_aliases.h: Make more static data const.
+
+ - magick/static.c: Make more static data const.
+
+2019-04-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/log.c (LogMagickEventList): Log elapsed time with
+ microsecond precision.
+
+2019-03-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/mpc.c (ReadMPCImage): Deal with a profile length of zero,
+ or an irrationally large profile length. Fixes SourceForge issue
+ #601 "memory leak in function ReadMPCImage of coders/mpc.c ".
+
+ - magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
+ case that the memory allocation for window->segment\_info
+ fails. Fixes SourceForge #595 "use allocate memory before null
+ check" as pertains to magick/xwindow.c.
+
+ - magick/segment.c (Classify): Add check for memory allocation
+ failure when allocating cluster array. Fixes SourceForge #595 "use
+ allocate memory before null check" as pertains to
+ magick/segment.c.
+
+ - coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
+ null check. Fixes SourceForge #595 "use allocate memory before
+ null check" as pertains to coders/pdb.c.
+
+2019-03-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (AllocateThreadViewSet): Simplify the image
+ view model by adding NexusInfo to the View structure (rather than
+ referencing it via a pointer) to lessen the number of required
+ per-thread allocations and to improve locality of reference.
+
+2019-03-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/wpg.c (WPG1\_Palette): Change to a static declaration.
+
+ - coders/dcm.c: dicom\_info array is now fully in the data segment.
+
+2019-03-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - configure.ac: Add support for using the Solaris mtmalloc
+ library. This is primarily for testing or as an alternative to
+ Solaris umem.
+ Stop using posix\_memalign() until it is uniformly more mature and
+ reliably quick.
+
+2019-03-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (SetNexus): Smallest staging-area
+ allocation is cache line size so declare it as such.
+
+ - magick/fx.c: Functions in the fx module which return a new Image
+ should return a null Image if an exception was thrown. Also,
+ assure that user has an opportunity to see the exception which was
+ thrown.
+
+ - magick/error.c (ThrowLoggedException): Throwing an exception is
+ now thread-safe.
+
+ - magick/pixel\_cache-private.h: Moved pixel cache private
+ definitions to private header.
+
+2019-03-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (SetNexus): Pass x, y, columns, and rows
+ rather than a pointer to RectangleInfo. This should be easier to
+ inline on modern CPUs.
+
+2019-03-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (SetNexus): Cache resource limits in
+ CacheInfo rather than repeatedly calling into the resource code in
+ order to lessen the overhead of performing resource limit checks
+ on the pixel cache views.
+
+ - magick/resource.c (AcquireMagickResource): Use a lock for each
+ resource in order to lessen contention. Return a maximum 64-bit
+ integer value if the resource has not been limited. Previously
+ returned -1 in this case but this was not documented.
+
+2019-03-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/import.c (ImportViewPixelArea): If range between max and
+ min is less than MagickEpsilon, produce a black image rather than
+ throwing an exception.
+
+ - coders/mat.c (ReadMATImage): Fix memory leak on unexpected end
+ of file. Fixes oss-fuzz 13556 "graphicsmagick/coder\_MAT\_fuzzer:
+ Direct-leak in ReadMATImage". (Credit to OSS-Fuzz)
+
+2019-03-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/mat.c (ReadMATImage): Quit if image scanlines are not
+ fully populated due to exception. Fixes oss-fuzz 13530
+ "graphicsmagick/coder\_MAT\_fuzzer: Use-of-uninitialized-value in
+ InsertComplexFloatRow". (Credit to OSS-Fuzz)
+
+2019-03-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/txt.c (ReadTXTImage): Don't start new line if x\_max <
+ x\_min. Avoids calling SetImagePixels() with a width of zero.
+ Related to oss-fuzz 13521 "graphicsmagick/coder\_TEXT\_fuzzer:
+ Floating-point-exception in SetNexus". (Credit to OSS-Fuzz)
+
+ - magick/pixel\_cache.c (SetNexus): Report error for empty region
+ rather than crashing due to divide by zero exception. This is a
+ new bug due to yesterday's changes. Fixes oss-fuzz 13521
+ "graphicsmagick/coder\_TEXT\_fuzzer: Floating-point-exception in
+ SetNexus". (Credit to OSS-Fuzz)
+
+2019-03-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - design/pixel-cache.dot: Update design dot diagram to remove
+ IsNexusInCore and add CompositeCacheNexus.
+
+ - magick/pixel\_cache.c (SetNexus): Apply resource limits to pixel
+ nexus allocations using the same limits (total pixels, width,
+ height, memory) as applied to the whole image since some requests
+ are directly influenced by the input file. Add yet more tests for
+ arithmetic overflow. Whole source module is re-arranged so that
+ static functions are in order of dependency so that forward
+ prototype declarations are no longer needed. Fixes oss-fuzz 13210
+ "graphicsmagick/coder\_MVG\_fuzzer: Integer-overflow in
+ SetNexus". (Credit to OSS-Fuzz)
+
+2019-03-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (OpenCache): Use unsigned 64-bit value to
+ store CacheInfo offset and length as well as for the total pixels
+ calculation. Add some more arithmetic overflow detections.
+
+ - coders/topol.c (ReadTOPOLImage): Report a corrupt image
+ exception "Unexpected end-of-file" if reader encounters end of
+ file while reading header rows. Addresses oss-fuzz 7981
+ "graphicsmagick/coder\_TOPOL\_fuzzer: Use-of-uninitialized-value in
+ InsertRow". (Credit to OSS-Fuzz)
+
+ - coders/mat.c (ReadMATImage): Report a corrupt image exception
+ "Unexpected end-of-file" if reader encounters end of file while
+ reading scanlines. Also added some helpful traces. Hopefully
+ addresses oss-fuzz 13445 "graphicsmagick/coder\_MAT\_fuzzer:
+ Use-of-uninitialized-value in IsGrayImage". (Credit to OSS-Fuzz)
+
+2019-02-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/image.h ("C"): Include as "magick/image-private.h" as the
+ other headers are.
+ ("C"): Include "magick/image-private.h" inside the protective
+ MAGICK\_IMPLEMENTATION guard, as it should have been. This error
+ broke the oss-fuzz build.
+
+2019-02-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/image-private.h (\_ImageExtra): Put ImageExtra definition
+ in a private header file so that its definition may be accessed
+ directly by library internals. Add some accessor macros to
+ provide access and update code to use them.
+
+ - coders/wpg.c (ReallocColormap): Make sure that there is not a
+ heap overwrite if the number of colors has been reduced. Thanks
+ to Jaroslav Fojtik for giving me a heads up about this.
+
+2019-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/monitor.c (MagickMonitorActive): Add new private function
+ to test if a progress monitor is active. Update all progress
+ monitor code in loops to use this information, while also updating
+ code to hopefully address concerns expressed by Hongxu Chen about
+ data races on the graphicsmagick-bugs mailing list starting on
+ February 6, 2019.
+
+2019-02-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/mpc.c (ReadMPCImage): Tally directory length to avoid
+ death by strlen().
+
+ - coders/miff.c (ReadMIFFImage): Tally directory length to avoid
+ death by strlen(). Fixes oss-fuzz 13190
+ "graphicsmagick/coder\_MIFF\_fuzzer: Timeout in
+ graphicsmagick\_coder\_MIFF\_fuzzer". (Credit to OSS-Fuzz)
+
+2019-02-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/svg.c (ReadSVGImage): Don't call xmlCleanupParser()
+ in module code since this may cause other libxml users to fail.
+
+ - coders/msl.c (ProcessMSLScript): Don't call xmlCleanupParser()
+ in module code since this may cause other libxml users to fail.
+
+ - magick/render.c (DrawDashPolygon): (DrawDashPolygon): Don't read
+ beyond end of dash pattern array. This is a second instance of
+ issue identified by SourceForge issue #591. Fixes oss-fuzz 13160
+ "graphicsmagick/coder\_MVG\_fuzzer: Heap-buffer-overflow in
+ DrawDashPolygon". The earlier attempt to fix this problem today
+ broke dash patterns entirely. (Credit to OSS-Fuzz)
+
+ - magick/annotate.c (RenderFreetype): Eliminate memory leak of
+ GlyphInfo.image (type FT\_Glyph) while rendering some FreeType
+ fonts such as the one we use now in the Magick++ test suite.
+
+2019-02-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/render.c (DrawDashPolygon): Avoid reading one beyond
+ length of dash pattern array, which is terminated by value 0.0.
+ Fixes SourceForge issue #591 "Heap buffer overflow in
+ DrawDashPolygon when parsing SVG images".
+ (DrawPrimitive): Add arithmetic overflow checks when converting
+ computed coordinates from 'double' to 'long'.
+ (DrawImage): Don't destroy draw\_info in graphic\_context when
+ draw\_info has not been allocated yet. Problem reported via email
+ by Sami Supperi on Thu, 14 Feb 2019.
+
+ - coders/jpeg.c (ReadJPEGImage): JPEG files are observed to
+ provide compression ratios as high as 2500 so allow for that.
+ Also, the test for "Unreasonable dimensions" delivered yesterday
+ was flawed since magick\_rows and magick\_columns are only set if a
+ desired image size was provided. Fixes SourceForge issue 592
+ "Non-malicious JPEG file fails with "Unreasonable dimensions"".
+
+ - coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
+ for images where photometic is PHOTOMETRIC\_RGB. Fixes oss-fuzz
+ 13115 "graphicsmagick/coder\_PTIF\_fuzzer:
+ Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
+ OSS-Fuzz)
+
+2019-02-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/jpeg.c (ReadJPEGImage): Base test for "Unreasonable
+ dimensions" on original JPEG dimensions and not the scaled
+ dimensions. Fixes SourceForge issue 593 "gm convert: Insufficient
+ image data in file when hinting input image".
+
+2019-02-13 Troy Patteson <troyp@ieee.org>
+
+ - PerlMagick/Magick.xs (Mogrify): Add decorate argument to Annotate.
+
+ - PerlMagick/Magick.xs (Mogrify): Remove reference to undefined
+ Annotate argument.
+
+2019-02-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/tiff.c (ReadTIFFImage): For planar TIFF, make sure that
+ pixels are initialized in case some planes are missing. Fixes
+ oss-fuzz 13046 "graphicsmagick/coder\_PTIF\_fuzzer:
+ Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
+ OSS-Fuzz)
+
+2019-02-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
+ returning. Similar to ImageMagick CVE-2019-7397 "In ImageMagick
+ before 7.0.8-25, several memory leaks exist in WritePDFImage in
+ coders/pdf.c.". Thanks to Petr Gajdos for bringing this issue to
+ our attention.
+
+2019-02-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/wpg.c (ReadWPGImage): Use a different way to reallocate
+ the colormap which preserves existing content, but also updates
+ image->colors and assures that added palette entries are
+ initialized.
+
+ - coders/png.c (ReadMNGImage): Bound maximum loop iterations by
+ subrange as a primitive means of limiting resource consumption.
+ This should finally resolve oss-fuzz 12738
+ "graphicsmagick/enhance\_fuzzer: Out-of-memory in
+ graphicsmagick\_enhance\_fuzzer". (Credit to OSS-Fuzz)
+
+ - coders/tiff.c (ReadTIFFImage): Assure that opacity channel is
+ initialized in the RGBAStrippedMethod case. Convert
+ 'CorruptImageError' encountered while testing for more frames to
+ 'CorruptImageWarning' so we return the frames already read.
+ Second try at fixing oss-fuzz 11896
+ "graphicsmagick/coder\_PTIF\_fuzzer: Use-of-uninitialized-value in
+ VerticalFilter".
+
+ - coders/dpx.c (AttributeToString): Eliminate clang
+ "-Wstring-plus-int" warning observed in oss-fuzz build.
+
+ - coders/cineon.c (AttributeToString): Eliminate clang
+ "-Wstring-plus-int" warning observed in oss-fuzz build.
+
+2019-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/pict.c (DecodeImage): Avoide a one-byte over-read of
+ pixels heap allocation. The cause of the over-read is not yet
+ understood. Fixes oss-fuzz 12019
+ "graphicsmagick/coder\_PICT\_fuzzer: Heap-buffer-overflow in
+ ExpandBuffer". (Credit to OSS-Fuzz)
+
+ - coders/wpg.c (ReadWPGImage): Assure that all colormap entries
+ are initialized. Fixes oss-fuzz 12614
+ "graphicsmagick/enhance\_fuzzer: Use-of-uninitialized-value in
+ EnhanceImage". (Credit to OSS-Fuzz)
+
+ - coders/tiff.c (ReadTIFFImage): Make sure that image is in
+ DirectClass mode and ignore any claimed colormap when the image is
+ read using the RGBAStrippedMethod, RGBATiledMethod, or
+ RGBAPuntMethod cases. Fixes oss-fuzz 12195
+ "graphicsmagick/coder\_PTIF\_fuzzer: Use-of-uninitialized-value in
+ ExportGrayQuantumType". (Credit to OSS-Fuzz)
+
+ - coders/miff.c (ReadMIFFImage): Improve pixel buffer calculations
+ to defend against overflow. Assure that zlib and bzlib decode the
+ expected number of bytes for a pixel row. Fixes oss-fuzz issue
+ 12448 "graphicsmagick/coder\_MIFF\_fuzzer:
+ Use-of-uninitialized-value in RGBTransformPackets". (Credit to
+ OSS-Fuzz)
+
+2019-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/png.c (ReadMNGImage): Quit processing and report error
+ upon failure to insert MNG background layer. Fixes oss-fuzz 12738
+ "graphicsmagick/enhance\_fuzzer: Out-of-memory in
+ graphicsmagick\_enhance\_fuzzer". (Credit to OSS-Fuzz)
+
+2019-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/dib.c (ReadDIBImage, WriteDIBImage): Improve buffer-size
+ calculations to guard against buffer overflows. The reader
+ version was not as complete as it should have been, whereas the
+ writer version did not guard against arithmetic overflow at all.
+
+ - coders/bmp.c (ReadBMPImage, WriteBMPImage): Improve buffer-size
+ calculations to guard against buffer overflows. This is a
+ follow-on fix to the previous fix submitted for SourceForge issue
+ #582 "heap-buffer-overflow in ReadBMPImage of bmp.c" which is now
+ also identified as CVE-2018-20185.
+
+ - www/Hg.rst: Updates to reflect current usage and availability.
+
+ - www/authors.rst: Promote Troy Patteson to the active contributor
+ category.
+
+2019-02-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/version.h.in: Rotate ChangeLog and update copyright
+ statements for the new year.
+
+2019-01-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
+ support WebP 'use\_sharp\_yuv' option ("if needed, use sharp (and
+ slow) RGB->YUV conversion") via `-define webp:use-sharp-yuv=true`.
+
+2019-01-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ - magick/pixel\_cache.c (SetNexus): Merge IsNexusInCore()
+ implementation code into SetNexus() and add check for if
+ cache\_info->pixels is null. Fixes SourceForge issue #588 "Bug in
+ IsNexusInCore()".
+
+ - configure.ac (DcrawExtraOptions): Request TIFF output from dcraw
+ if build supports TIFF format in order to obtain more metadata.
+ This allows obtaining some metadata from standard TIFF tags
+ (e.g. camera make, model, and dcraw version), and any attached ICC
+ profile, but not specifically EXIF data since we don't support
+ extracting EXIF data from TIFF yet. Inspired by SourceForge issue
+ 589 "Identify lack of data (no Exif) in RAW formats".
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
-<title></title>
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
+<title>Changelog.rst</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
<body>
<div class="document">
-<p>2019-12-24 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>
+<p>2020-02-23 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>NEWS.txt: Updates in preparation for 1.3.34 release.</li>
+<li>version.sh: Updates in preparation for the 1.3.35 release.
+Merge changes for 1.3.35 into GraphicsMagick-1_3 branch.</li>
+<li>www/INSTALL-windows.rst: Update Windows installation and build
+documentation.</li>
</ul>
</blockquote>
-<p>2019-12-22 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>
+<p>2020-02-22 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>NEWS.txt: Update with changes since the last GM release.</li>
-<li>coders/png.c (png_read_raw_profile): Use size_t type to store
-profile length and 'nibbles'. Use safer way to test for profile
-buffer overflow.
-(ReadOnePNGImage): Use size_t type to store 'ping_rowbytes',
-'length', and 'row_offset'. Check png_pixels allocation for
-arithemetic overflow when computing the required allocation size.</li>
-<li>coders/tiff.c (WriteNewsProfile): Use size_t type to store
-profile length.</li>
-<li>coders/pict.c (WritePICTImage): Avoid 'alloc-size-larger-than'
-warning from GCC when allocating row_bytes.</li>
-</ul>
-</blockquote>
-<p>2019-12-21 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>tiff/libtiff/tiffconf.h: Add standard/common libtiff 'SUPPORT'
-options which are used in full-fledged Autoconf/Cmake libtiff
-builds but were missing from the Visual C template file. In
-particular, WebP is now supported and JBIG is somewhat supported.</li>
-<li>VisualMagick/jbig/libjbig/LIBRARY.txt (EXCLUDE): Remove
-tstcodec85.c from JBIG library build.</li>
-<li>VisualMagick/configure/configure.cpp: Add JBIG library to
-include path when building libraries. Add WebP as a dependency
-when building libtiff.</li>
-</ul>
-</blockquote>
-<p>2019-12-16 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>magick/nt_base.h ("C"): Assume that float versions of functions
-became available in Visual Studio 2008.</li>
-</ul>
-</blockquote>
-<p>2019-12-15 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>magick/log.c (InitializeLogInfo): Using the compiled-in
-defaults, always log to stderr by default, even under Microsoft
-Windows. The logging output may then be diverted to
-'win32eventlog' as soon as a log.mgk file is loaded if that is
-desired. This should not be much of a problem because loading a
-log.mgk file is the first thing that the library attempts to do.
-This change is made due to users and developers being baffled at
-not seeing any log output due to the log output going to the (very
-unfriendly) Windows application log.</li>
-<li>webp: libwebp is updated to the 1.0.3 release.</li>
-</ul>
-</blockquote>
-<p>2019-12-15 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
-<blockquote>
-<ul class="simple">
-<li>magick/nt_base.c Fix user only installation of Ghostscript.</li>
-</ul>
-</blockquote>
-<p>2019-12-14 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>rungm.sh.in (DIRSEP): DIRSEP should always use Unix conventions for
-Autotools-based builds.</li>
-<li>magick/module.h ("C"): Eliminiate redundant and conflicting
-ListModuleInfo() prototype.</li>
-<li>coders/miff.c (ReadMIFFImage): Eliminate warnings in trace
-statements.</li>
-<li>coders/dib.c (DecodeImage): Eliminate warnings in trace
-statements.</li>
-<li>coders/bmp.c (DecodeImage): Eliminate warnings in trace
-statements.</li>
-<li>magick/studio.h (SupportMagickModules): Fix the preprocessor
-logic controlling SupportMagickModules, which became broken for
-GCC MinGW-based builds starting in the 1.3.29 release when a
-"static" module loader was implemented. Due to an error in the
-preprocessor logic, only the "modules" based build was working for
-MinGW. Much thanks to Giovanni Remigi for making us aware of this
-issue.</li>
-</ul>
-</blockquote>
-<p>2019-12-12 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>coders/pict.c (WritePICTImage): Throw a writer exception if the
-PICT width limit is exceeded. Fixes SourceForge issue 617
-"heap-buffer-overflow in function EncodeImage of coders/pict.c".</li>
-</ul>
-</blockquote>
-<p>2019-12-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>jbig: jbigkit is updated to 2.1 release.</li>
-<li>libxml: libxml2 is updated to 2.9.10 release.</li>
-<li>bzlib: bzip is updated to 1.0.8 release.</li>
-<li>zlib: zlib is updated to 1.2.11 release.</li>
-<li>png: libpng is updated to 1.6.37 release.</li>
-</ul>
-</blockquote>
-<p>2019-12-07 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>lcms: lcms2 is updated to 2.9 release.</li>
-<li>tiff: libtiff is updated to 4.1.0 release.</li>
-</ul>
-</blockquote>
-<p>2019-11-24 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>magick/render.c (DrawPatternPath): Don't leak memory if
-fill_pattern or stroke_pattern of cloned draw_info are not null.
-Fixes oss-fuzz issue 18948 "graphicsmagick:coder_MVG_fuzzer:
-Indirect-leak in CloneImage".
-(PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
-memory.</li>
-</ul>
-</blockquote>
-<p>2019-11-23 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>magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
-17986 "graphicsmagick:coder_JPG_fuzzer: Heap-buffer-overflow in
-GenerateEXIFAttribute". This problem likely only happens in
-32-bit builds.</li>
-</ul>
-</blockquote>
-<p>2019-11-17 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>coders/png.c (ReadMNGImage): Only magnify the image if the
-requested magnification methods are supported.</li>
-</ul>
-</blockquote>
-<p>2019-11-16 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>magick/compress.c (HuffmanDecodeImage): Fix signed overflow on
-range check which leads to heap overflow in 32-bit
-applications. Requires a relatively large file input compared with
-typical fuzzer files (greater than a megabyte) to trigger.
-Problem reported to the graphicsmagick-security mail address by
-Justin Tripp on 2019-11-13.
-(Ascii85Tuple): Fix thread safety issue by requiring caller to
-pass in tuple buffer as an argument and having callers allocate
-tuple buffer on the stack.</li>
-</ul>
-</blockquote>
-<p>2019-11-10 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>magick/bit_stream.c: Add restrict declarations to slightly
-improve performance and decrease code size.</li>
-<li>TclMagick/pkgIndex.tcl: Incorporate recommendations from third
-problem noted in SourceForge issue #420 "TclMagick issues and
-patch". This is supposed to help support using an uninstalled
-GraphicsMagick and allow the installation path to contain a space.</li>
-<li>wand/magick_wand.c (MagickClearException): Destroy any existing
-exception info before re-initializing the exception info or else
-there will be a memory leak.</li>
-<li>TclMagick/generic/libttkcommon.c (myMagickError): Clear
-exception from the Wand after it has been reported. Addresses the
-fourth problem noted by SourceForge issue #420 "TclMagick issues
-and patch". However, MagickClearException() already clears an
-exception in the Wand, so a new function is not needed.</li>
-<li>TclMagick/unix/m4/tcl.m4: Change hard-coded INSTALL path to
-point to config/install-sh. Re-generated/updated Autotools stuff
-by executing the genconf.sh script. Addresses the first problem
-noted by SourceForge issue #420 "TclMagick issues and patch".</li>
-</ul>
-</blockquote>
-<p>2019-11-02 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>magick/pixel_cache.c (SetNexus): Eliminate warning about
-possibly uninitialized variable from primordial GCC 3.4.3.</li>
-<li>magick/render.c (ConvertPrimitiveToPath): Eliminate warning that
-IsClosedSubPath might be used uninitialized.</li>
-<li>magick/common.h ("MAGICK_FALLTHROUGH"): Added a
-MAGICK_FALLTHROUGH macro to support the GCC/Clang fallthrough
-attribute when the time comes again that it would be useful.</li>
-</ul>
-</blockquote>
-<p>2019-10-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>
-<ul class="simple">
-<li>coders/pcx.c (ReadPCXImage): Verify that pixel region is not
-negative. Assure that opacity channel is initialized to
-opaqueOpacity. Update DirectClass representation while
-PseudoClass representation is updated. Improve read performance
-with uncompressed PCX.</li>
-</ul>
-</blockquote>
-<p>2019-10-16 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>coders/xpm.c (ReadXPMImage): Image properties are expected to
-appear within the first 512 bytes of the XPM file header. fixes
-oss-fuzz 18267 "graphicsmagick:coder_PICON_fuzzer: Timeout in
-coder_PICON_fuzzer".</li>
-</ul>
-</blockquote>
-<p>2019-10-14 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>configure.ac: Fix tcmalloc configuration report.</li>
-</ul>
-</blockquote>
-<p>2019-10-13 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>coders/wpg.c (ReadWPGImage): Implement subimage/subrange
-support.</li>
-<li>coders/mat.c (ReadMATImage, ReadMATImageV4): Implement
-subimage/subrange support. Should resolve oss-fuzz 14999
-"graphicsmagick/coder_MAT_fuzzer: Out-of-memory in
-graphicsmagick_coder_MAT_fuzzer".</li>
-<li>coders/tiff.c (TIFFMapBlob): Fix compile problem if
-LOG_TIFF_BLOB_IO is defined.</li>
-<li>coders/wpg.c (ExtractPostscript): Improve performance. Avoid
-temporary files if possible. Avoid additional memory allocations
-if possible. Should address oss-fuzz issue 18173
-"graphicsmagick:enhance_fuzzer: Timeout in enhance_fuzzer" and
-oss-fuzz issue 17714 "graphicsmagick:coder_WPG_fuzzer: Timeout in
-coder_WPG_fuzzer".</li>
-</ul>
-</blockquote>
-<p>2019-10-12 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>coders/pnm.c (PNMInteger): Place a generous arbitrary limit on
-the amount of PNM comment text to avoid denial of service
-opportunity. Fixes oss-fuzz 18162 "Timeout · coder_PNM_fuzzer".</li>
-</ul>
-</blockquote>
-<p>2019-10-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>coders/dps.c (ReadDPSImage): Fix memory leak when OpenBlob()
-reports failure. Same as ImageMagick CVE CVE-2019-16709.</li>
-</ul>
-</blockquote>
-<p>2019-09-27 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>magick/attribute.c (GenerateEXIFAttribute): Skip
-unsupported/invalid format 0. Fixes oss-fuzz issue 17597
-"graphicsmagick:coder_SFW_fuzzer: Heap-buffer-overflow in
-GenerateEXIFAttribute".</li>
-</ul>
-</blockquote>
-<p>2019-09-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>
-<ul class="simple">
-<li>fuzzing/oss-fuzz-build.sh: Change by Alex Gaynor so that the
-correct oss-fuzz fuzzing engine should be used.</li>
-</ul>
-</blockquote>
-<p>2019-09-18 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>magick/static.c (OpenModule): Static module loader should use
-upper-cased magick string when searching for a module alias.
-Fixes SourceForge issue #613 "static module loader is still
-case-sensitive".</li>
-</ul>
-</blockquote>
-<p>2019-09-16 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>configure.ac: Report status of zstd (FaceBook Zstandard)
-compression in configuration summary.</li>
-</ul>
-</blockquote>
-<p>2019-09-15 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>magick/render.c (TraceArcPath): Substitute a lineto command when
-tracing arc is impossible. Fixes oss-fuzz 10765
-"graphicsmagick/coder_MVG_fuzzer: Divide-by-zero in TraceArcPath".</li>
-</ul>
-</blockquote>
-<p>2019-09-14 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>coders/png.c (png_read_raw_profile): Fix validation of raw
-profile length. Fixes oss-fuzz 16906
-"graphicsmagick:coder_ICO_fuzzer: Out-of-memory in
-graphicsmagick_coder_ICO_fuzzer".</li>
-<li>coders/wpg.c (ReallocColormap): Avoid dereferencing a null
-pointer if image->colormap is null. Fixes oss-fuzz 17004
-"graphicsmagick:coder_WPG_fuzzer: Null-dereference READ in
-ReallocColormap".</li>
-</ul>
-</blockquote>
-<p>2019-09-13 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>magick/memory.c (MagickRealloc): Add a note that the behavior of
-this function is as described for BSD reallocf(3), which is now
-appearing in Linux's GNU libc and elsewhere.</li>
-</ul>
-</blockquote>
-<p>2019-09-09 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>www/OpenMP.rst: Document the significant OpenMP speed-up which
-may be obtained by using an alternate memory allocation library.
-Currently 'tcmalloc', 'mtmalloc', and 'umem' are supported as
+<li>NEWS.txt: Update with News since previous release.</li>
+<li>magick/magick.c (InitializeMagickSignalHandlers): This private
+implementation function is now a static function as it should have
+been.
+(InitializeMagickEx): New function which may be used in place of
+InitializeMagick() to initialize GraphicsMagick. This
+initialization function returns an error status value, may update
+a passed ExceptionInfo structure with error information, and
+provides an options parameter which supports simple bit-flags to
+tailor initialization. The signal handler registrations are
+skipped if the MAGICK_OPT_NO_SIGNAL_HANDER flag is set in the
options.</li>
-<li>www/INSTALL-unix.rst: Document new --with-tcmalloc option to
-enable using Google gperftools tcmalloc library.</li>
-<li>configure.ac: Add support for using Google gperftools tcmalloc
-library via the --with-tcmalloc option.</li>
-<li>scripts/rst2htmldeco.py: Port to Python 3 syntax and require at
-least Python 2.6.</li>
-<li>scripts/relpath.py: Port to Python 3 syntax and require
-at least Python 2.6.</li>
-<li>scripts/html_fragments.py: Port to Python 3 syntax and require
-at least Python 2.6.</li>
-<li>scripts/format_c_api_doc.py: Port to Python 3 syntax and require
-at least Python 2.6.</li>
-</ul>
-</blockquote>
-<p>2019-08-27 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>doc/GraphicsMagick.imdoc: Document gm utility exit status codes.</li>
-</ul>
-</blockquote>
-<p>2019-08-25 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>magick/render.c (PRIMITIVE_INFO_POINTS_MAX): SIZE_MAX apparently
-rounds up by one when cast to a double on 64-bit systems. Due to
-this, and in order to set more rational implementation limits, add
-a PRIMITIVE_INFO_POINTS_MAX definition which computes and
-constrains the maximum number of PrimitiveInfo entries allowed.</li>
-</ul>
-</blockquote>
-<p>2019-08-24 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>magick/attribute.c (GenerateEXIFAttribute): Check that we are
-not being directed to read an IFD that we are already parsing and
-quit in order to avoid a loop. Addresses oss-fuzz 15753
-"graphicsmagick/coder_JPEG_fuzzer: Timeout in
-graphicsmagick_coder_JPEG_fuzzer" and 16068
-"graphicsmagick/coder_SFW_fuzzer: Timeout in
-graphicsmagick_coder_SFW_fuzzer".</li>
-<li>tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
-irritating GCC 9 "__builtin_strncpy' output may be truncated"
-warnings due to copying MaxTextExtent-1 characters. Instead
-request copying all of the characters and also assure that string
-is still null terminated.</li>
-<li>doc/environment.imdoc: Update documentation pertaining to HOME
-and MAGICK_DEBUG environment variables.</li>
-</ul>
-</blockquote>
-<p>2019-08-23 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>magick/log.c (DestroyLogInfo): Only output text to terminate an
-XML format log file if XML format is active.</li>
-</ul>
-</blockquote>
-<p>2019-08-22 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>magick/render.c (ExtractTokensBetweenPushPop): Previous fix for
-non-terminal loop was broken by a last-minute untested edit.
-Finally addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer:
-Timeout in graphicsmagick_coder_MVG_fuzzer".</li>
-</ul>
-</blockquote>
-<p>2019-08-17 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>fuzzing/utils.cc (MemoryResource): Lessen the memory limit used
-for oss-fuzz testing in order to provide more headroom and margin
-for error.</li>
-<li>magick/render.c (TraceBezier): Detect arithmetic overflow and
-return errors via normal error path rather than exiting. Fixes
-oss-fuzz 16450 "graphicsmagick:coder_MVG_fuzzer: Unexpected-exit
-in DefaultFatalErrorHandler".
-(PrimitiveInfoRealloc): Implement more paranoid code related to
-primitive allocation.</li>
-</ul>
-</blockquote>
-<p>2019-08-16 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>magick/render.c (DrawStrokePolygon): Handle case where
-TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
-"graphicsmagick/coder_MVG_fuzzer: ASSERT: primitive_info !=
-(PrimitiveInfo *) NULL".
-(DrawDashPolygon): Handle case where DrawStrokePolygon() returns
-MagickFail. Also needed to address oss-fuzz 15516, since otherwise
-test-cases run for a very long time.
-(ExtractTokensBetweenPushPop): Fix non-terminal parsing loop.
-Addresses oss-fuzz 15318 "graphicsmagick/coder_MVG_fuzzer: Timeout
-in graphicsmagick_coder_MVG_fuzzer".</li>
-</ul>
-</blockquote>
-<p>2019-08-15 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>magick/memory.h (MagickMallocAlignedArray): Add function
-attributes for added value and to quench GCC 9 warning with
-special build options enabled.</li>
-<li>magick/deprecate.h (AcquireMemory): Add more function attributes
-to quench GCC 9 warning with special build options enabled.</li>
-<li>magick/attribute.c (GenerateEXIFAttribute): Fix compilation
-warning in 32-bit build.</li>
-<li>coders/dpx.c (AttributeToString): Eliminate annoying warnings
-from GCC 9, although the code was correct.</li>
-<li>coders/msl.c (MSLStartElement): Fix defective opacity percentage
-code revealed by GCC 9 warning.</li>
-</ul>
-</blockquote>
-<p>2019-08-14 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>coders/png.c (ReadMNGImage): Skip coalescing layers if there is
-only one layer. Fixes oss-fuzz 16274
-"graphicsmagick/coder_MNG_fuzzer: Unexpected-exit in
-DefaultFatalErrorHandler".</li>
-</ul>
-</blockquote>
-<p>2019-08-12 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>coders/png.c (ReadPNGImage): Post-processing to convert the
-image type in the PNG reader based on a specified magick prefix
-string is now disabled. This can (and should) be done after the
-image has been returned. Fixes oss-fuzz 16386
-"graphicsmagick:coder_PNG8_fuzzer: Timeout in
-graphicsmagick_coder_PNG8_fuzzer".</li>
-</ul>
-</blockquote>
-<p>2019-07-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>NEWS.txt: Updates in preparation for 1.3.33 release.</li>
-</ul>
-</blockquote>
-<p>2019-07-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>
-<ul class="simple">
-<li>NEWS.txt: Updated NEWS to reflect updates since last release.</li>
-</ul>
-</blockquote>
-<p>2019-07-12 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>coders/png.c (WriteOnePNGImage): Fix saving to palette when
-image has an alpha channel but no color is marked as transparent.
-Patch submitted by Przemysław Sobala via SourceForge patch #61
-"WriteOnePNGImage(): Fix saving to palette when image has an alpha
-channel but no color is marked as transparent".</li>
-<li>doc/options.imdoc (characters): Fix -format documentation to
-reflect that '%r' returns the image type. Patch submitted by
-Przemysław Sobala via SourceForge patch #60 "Fix documentation
-typo".</li>
-</ul>
-</blockquote>
-<p>2019-07-07 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>magick/tempfile.c (AcquireTemporaryFileDescriptor): Fix
-compilation under Cygwin. Patch by Marco Atzeri and submitted via
-email to the graphicsmagick-help mailing list on Fri, 5 Jul 2019.</li>
-</ul>
-</blockquote>
-<p>2019-06-23 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>magick/attribute.c (GenerateEXIFAttribute): Added range checks
-and tracing. Fixes oss-fuzz 14998
-"graphicsmagick/coder_JPEG_fuzzer: Heap-buffer-overflow in
-Read32s". This is a tiny read overflow.</li>
-<li>coders/miff.c (ReadMIFFImage): Similar fix as to mpc.c</li>
-<li>coders/mpc.c (ReadMPCImage): Fix faulty signed overflow logic
-for profiles[i].length which still allowed overflow. Fixes
-oss-fuzz issue 15190 "graphicsmagick/coder_MPC_fuzzer:
-Out-of-memory in graphicsmagick_coder_MPC_fuzzer".</li>
-<li>doc/options.imdoc: Add notes about security hazards due to
-commands which support a <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax.</li>
-<li>www/security.rst: Add notes about security hazards due to
-commands which support a <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax.</li>
-</ul>
-</blockquote>
-<p>2019-06-22 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>magick/render.c (DrawImage): Assure that 'token' is initialized.
-Fixes oss-fuzz issue 14897 "graphicsmagick/coder_MVG_fuzzer:
-Use-of-uninitialized-value in DrawImage".</li>
-<li>magick/animate.c (MagickXAnimateImages): Fix memory leak of
-scene_info.pixels.</li>
-<li>magick/display.c (MagickXDisplayImage): Fix heap overwrite of
-windows->image.name and windows->image.icon_name buffers. It
-appears that the code assumed that CloneString() would always
-allocated a string at least MaxTextExtent in size. I assume that
-this issue has existed for a very long time since CloneString()
-was re-written many years ago.</li>
-<li>coders/caption.c (ReadCAPTIONImage): The CAPTION reader did not
-appear to work at all any more. Now it works again, but still not
-very well.</li>
-<li>magick/command.c: Re-implement '@' file inclusion support for
--comment, -draw, -format, and -label which was removed for the
-1.3.32 release. Note that arguments from untrusted sources will
-still need to be sanitized to detect attempts to subvert this
-feature to access file data, but this feature has always been
-supported by GraphicsMagick and it originated early in the
-development of ImageMagick.</li>
-</ul>
-</blockquote>
-<p>2019-06-17 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>magick/utility.c (MagickStrlCat, MagickStrlCpy): Add debug
-checks enabled by MAGICK_STRL_CHECK.</li>
-<li>magick/montage.c (MontageImages): Fix wrong length argument to
-strlcat() when building montage directory, which could allow heap
-overwrite.</li>
-<li>coders/png.c (RegisterPNGImage): Pass correct size value to
-strlcat(). Under Apple's OS X (and possibly other targets)
-strlcat() writes bytes beyond what it needs to (but within the
-range it is allowed to) causing a crash due to the wrong limit
-value. Fixes SourceForge issue #609 <cite>gm identify foo.png</cite> crashes
-on macOS (v 1.3.32).</li>
-<li>www/Changes.rst: Update ChangeLog links due to new year, and
-1.3.32 release.</li>
-</ul>
-</blockquote>
-<p>2019-06-16 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>coders/bmp.c (WriteBMPImage): Detect arithmetic overflow of
-image_size. Add more tracing. Reduce compilation warnings.
-(EncodeImage): Reduce compilation warnings.
-(WriteBMPImage): Assure that chromaticity uses double-precision
-for multiply before casting to unsigned integer.</li>
-<li>coders/wpg.c (ReallocColormap): Reduce compilation warnings.</li>
-<li>coders/braille.c (WriteBRAILLEImage): Reduce compilation
-warnings.</li>
-<li>coders/dib.c (WriteDIBImage): Detect arithmetic overflow of
-image_size. Reduce compilation warnings.
-(EncodeImage): Reduce compilation warnings.</li>
-<li>coders/locale.c (WriteLOCALEImage): Reduce compilation warnings.</li>
-</ul>
-</blockquote>
-<p>2019-06-15 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>Makefile.am (dist-zstd): Use the maximum possible compression
-level (22) when creating a Zstd-compressed tarball to get close to
-lzip/xz compression levels.</li>
-<li>coders/tiff.c (ReadTIFFImage): Fix typo in initialization of
-'tile' pointer variable.</li>
-<li>version.sh: Updates in preparation for 1.3.32 release.</li>
-</ul>
-</blockquote>
-<p>2019-06-14 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>Makefile.am (release): Add a release target to make it easier to
-produce and sign the release files. Add a zstd-compressed output
-tarball just because we can.</li>
-</ul>
-</blockquote>
-<p>2019-06-12 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>magick/render.c (DrawImage): Fix typo when initializing
-number_coordinates. Somehow GCC and clang let this typo slip by.</li>
</ul>
</blockquote>
-<p>2019-06-11 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>
+<p>2020-02-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>
<ul class="simple">
-<li>coders/dib.c (ReadDIBImage): Preserve PseudoClass opaque
-representation if ICO mask is opaque, otherwise return a
-DirectClass image.</li>
+<li>magick/magick.c (MagickToMime): Add a MIME translation for
+"jpg". Issue reported by Pro Turm.</li>
</ul>
</blockquote>
-<p>2019-06-10 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>
+<p>2020-02-18 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>magick/render.c (DrawImage): Detect an error in TracePath() and
-quit rather than forging on.</li>
+<li>www/INSTALL-windows.rst: Add quoting to avoid losing backslashes
+in Windows paths.</li>
</ul>
</blockquote>
-<p>2019-06-09 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>
+<p>2020-02-16 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>magick/render.c (DrawImage): Terminate drawing if
-DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
-"graphicsmagick/coder_MVG_fuzzer: Timeout in
-graphicsmagick_coder_MVG_fuzzer".
-(TracePath): Terminate path parsing upon first parsing error.</li>
+<li>magick/common.h: Add missing unsupported handling for some
+recently added GCC/Clang attributes.</li>
+<li>magick/: Move all remaining private implementation code in
+public headers which is guarded by MAGICK_IMPLEMENTATION into
+private headers, which are never installed.</li>
</ul>
</blockquote>
-<p>2019-06-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>
+<p>2020-02-15 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>coders/txt.c (ReadTXTImage): Use real a new-line character as
-line delimiter rather than 'n' string.</li>
-<li>magick/annotate.c (AnnotateImage): No longer implicitly call
-TranslateText() since this is not suitable for most use-cases and
-causes additional performance impact. The API user can perform
-such translations in advance on the text string using
-TranslateText() if need be. No longer call StringToList() to
-split strings into an array of strings since this can lead to
-unexpected results, and a custom-splitter is more efficient.</li>
+<li>coders/tiff.c (WriteTIFFImage): Evidence suggests that large
+strip sizes improve performance by reducing the number of I/Os.
+The defaults suggested by libtiff are way to small for today's
+images and computers. Default TIFF strip sizes so that each
+uncompressed strip consumes up to 1MiB of memory, or 4MiB for FAX
+oriented codecs, or based on LZMA compression level when using
+LZMA compression. The default size may be adjusted via the
+TIFF_BYTES_PER_STRIP preprocessor definition.</li>
</ul>
</blockquote>
-<p>2019-06-06 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>
+<p>2020-02-09 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
<blockquote>
<ul class="simple">
-<li>magick/render.c (DrawImage): Only support <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax to
-read drawing primitive from a file if we are not already drawing.</li>
-<li>magick/utility.c (TranslateTextEx): Remove support for reading
-from a file using <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' syntax due to security concerns.
-Problem was reported to us by "Battle Furry" via the
-GraphicsMagick security mail alias on June 6, 2019.</li>
+<li>coders/wpg.c ZeroFillMissing data will never been triggered when
+y>=image->rows.</li>
</ul>
</blockquote>
-<p>2019-06-03 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>
+<p>2020-02-09 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>magick/utility.c (SetClientFilename): Reduce initialized data
-some more.</li>
+<li>magick/render.c (DrawImage): Limit pattern dimensions by
+LONG_MAX rather than ULONG_MAX since this seems more likely to
+avoid arithmetic overflows later on.</li>
</ul>
</blockquote>
-<p>2019-06-02 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>
+<p>2020-02-09 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
<blockquote>
<ul class="simple">
-<li>magick/nt_base.c: Search for n019003l.pfb (the "Helvetica"-like
-font) rather than fonts.dir since fonts.dir is not present in all
-URW font collections.</li>
-<li>NEWS.txt: Update news.</li>
+<li>coders/wpg.c Check for exception in image.</li>
</ul>
</blockquote>
-<p>2019-06-01 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>
+<p>2020-02-09 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>coders/logo.c: Tidy logo image definitions, and logo image
-output.</li>
+<li>magick/command.c (VersionCommand): Add Google perftools tcmalloc
+to the available feature support.</li>
+<li>www/INSTALL-unix.rst: Include some information about building
+with MSYS2.</li>
+<li>coders/png.c (ReadOnePNGImage): Eliminate compilation warnings
+about signed/unsigned comparisons.</li>
+<li>magick/image.c: Remove private global string constants, and one
+private global unsigned long constant, from the library ABI.
+Since the global constants were declared via a private header and
+only used within the GraphicsMagick build, removing these does not
+impact the public ABI. The globals removed are BackgroundColor,
+BorderColor, DefaultTileFrame, DefaultTileGeometry,
+DefaultTileLabel, ForegroundColor, HighlightColor, MatteColor,
+PSDensityGeometry, PSPageGeometry, and DefaultCompressionQuality.</li>
</ul>
</blockquote>
-<p>2019-05-23 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>
+<p>2020-02-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>coders/mat.c: Make more data const.</li>
+<li>magick/render.c (DrawImage): Apply draconian pattern
+specification offset and dimension validations. Hopefully there
+is no impact to usability. If so please report it as a bug.
+Fixes oss-fuzz 20586 "graphicsmagick:coder_MVG_fuzzer:
+Integer-overflow in DrawPolygonPrimitive".</li>
+<li>coders/svg.c (ReadSVGImage): Fix dereference of NULL pointer
+when stopping image timer.</li>
</ul>
</blockquote>
-<p>2019-05-22 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>
+<p>2020-02-06 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>magick/animate.c: Reduce initialized static allocations.</li>
-<li>magick/display.c: Reduce initialized static allocations.</li>
-<li>magick/widget.c (MagickSplitNDLTextToList): Add static
-implementation function.</li>
+<li>coders/pict.c (DecodeImage): Allocate extra scanline memory to
+allow small RLE overrun. Fixes oss-fuzz 20271
+"graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
+ExpandBuffer" and 20272 "graphicsmagick:coder_PICT_fuzzer:
+Heap-buffer-overflow in DecodeImage".</li>
+<li>PerlMagick/t/wmf/read.t: Update WMF reference images. Relax
+test requirements for ski.wmf.</li>
+<li>locale/C.mgk: Correct error message associated with
+"UnsupportedNumberOfRows". Patch was submitted by Thorsten
+Alteholz via private email on 2020-02-05.</li>
</ul>
</blockquote>
-<p>2019-05-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>
+<p>2020-02-04 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>coders/webp.c (RegisterWEBPImage): Use sprintf to format version
-since snprintf is not available in old Visual Studio.</li>
+<li>coders/topol.c: Include magick/magick_endian.h.</li>
</ul>
</blockquote>
-<p>2019-05-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>
+<p>2020-02-03 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>coders/dcm.c: Make more data const.</li>
-<li>www/INSTALL-unix.rst: Add documentation for how to install URW
-fonts from various package management systems.</li>
+<li>magick, coders, wand: Added copious casts to avoid possible
+integer overflows in the Microsoft Windows 64-bit build, where
+sizeof(long) < sizeof(size_t).</li>
</ul>
</blockquote>
-<p>2019-05-18 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>
+<p>2020-01-26 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>www/authors.rst: Add authorship attribution to Samuel Thibault
-for contributing support for the Braille image format.</li>
-<li>coders/braille.c: Add support for Braille image format by Samuel
-Thibault. Patch submitted via SourceForge patch #59 "Add braille
-image format support.</li>
+<li>magick/render.h ("PrimitiveInfo"): Change PrimitiveInfo
+coordinates from type 'unsigned long' to 'size_t'.</li>
</ul>
</blockquote>
-<p>2019-05-17 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>
+<p>2020-01-24 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>magick/tempfile.c: Make more data const.</li>
-<li>magick/signature.c: Make more data const.</li>
-<li>magick/quantize.c: Make more data const.</li>
-<li>magick/attribute.c: Make more data const.</li>
-<li>coders/png.c: Make more data const.</li>
-<li>coders/mpeg.c: Make more data const.</li>
-<li>coders/wmf.c: Make more data const.</li>
-<li>coders/tile.c: Make more data const.</li>
+<li>magick/gradient.c (GradientImage): Warnings reduction, plus note
+about incorrect diagonal gradients math.</li>
</ul>
</blockquote>
-<p>2019-05-16 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>
+<p>2020-01-20 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
<blockquote>
<ul class="simple">
-<li>magick/enum_strings.c: Make more data const.</li>
+<li>VisualMagickconfigureconfigure.cpp Option /arch:SSE2 is
+available only for 32 bit build.</li>
</ul>
</blockquote>
-<p>2019-05-15 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>
+<p>2020-01-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>
<ul class="simple">
-<li>magick/magick.c: Make more data const.</li>
-<li>magick/type.c (GetTypeInfoByFamily): Make more data const.</li>
-<li>magick/unix_port.c (MagickGetMMUPageSize): Decrease initialized
-data.</li>
-<li>magick/utility.c (GetPageGeometry): Make more data const.</li>
-<li>coders/pdf.c (WritePDFImage): Allocate working buffer on stack
-and pass as argument to EscapeParenthesis() to eliminate a thread
-safety problem and also reduce BSS size.</li>
-<li>coders/webp.c (RegisterWEBPImage): Fix compiler warning.</li>
-<li>coders/jbig.c (RegisterJBIGImage): Make more data const.</li>
-<li>coders/pict.c (DecodeImage): Allocate output buffer used by
-ExpandBuffer() on the stack rather than as static data private to
-ExpandBuffer(). Eliminates a thread safety problem and also
-reduces BSS size.</li>
-<li>coders/webp.c (RegisterWEBPImage): Reduce BSS size.</li>
+<li>coders/pcd.c (DecodeImage): Assure that pcd_length gets
+initialized with something.</li>
+<li>Magick++/lib/Options.cpp (strokeDashArray): Add needless check
+for _drawInfo->dash_pattern null in order to make static analysis
+happy.</li>
+<li>magick/render.c (DestroyPolygonInfo): Make sure to not
+dereference a null edges pointer.</li>
+<li>coders/pdb.c (WritePDBImage): Make sure that null comment value
+is not dereferenced.</li>
+<li>coders/vid.c (ReadVIDImage): Make sure that
+ThrowVIDReaderException does not dereference a null pointer.</li>
+<li>magick/quantize.c (ClassifyImageColors): Fix error handling so a
+null pointer won't be consumed after a memory allocation failure.
+Changed the location of some variable declarations and added some
+comments.</li>
</ul>
</blockquote>
-<p>2019-05-14 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>
+<p>2020-01-18 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>coders/jp2.c: Make more data const.</li>
-<li>coders/wmf.c: Make more data const.</li>
-<li>coders/ps.c (WritePSImage): Make more data const.</li>
-<li>coders/ps2.c (WritePS2Image): Make more data const.</li>
-</ul>
-</blockquote>
-<p>2019-05-13 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>magick/static.c: Revert to previous 'name' storage. Callback
-functions in structure block being properly const.</li>
-<li>coders/xpm.c: Make more data const.</li>
-<li>coders/pnm.c: Make more data const.</li>
-<li>coders/palm.c: Make more data const.</li>
-<li>coders/meta.c: Make more data const.</li>
-<li>coders/dcraw.c: Make more data const.</li>
-<li>magick/command.c: Fix compilation problem when HasX11 is not
-defined.</li>
-</ul>
-</blockquote>
-<p>2019-05-12 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>magick/command.c: Make more data const.</li>
-</ul>
-</blockquote>
-<p>2019-05-11 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>coders/webp.c (RegisterWEBPImage): Make more data const.</li>
-<li>coders/svg.c (RegisterSVGImage): Reduce BSS size.</li>
-<li>coders/miff.c (RegisterMIFFImage): Fix version reporting.</li>
-<li>coders/ttf.c (RegisterTTFImage): Fixed reporting of FreeType
-version.</li>
-<li>coders/tiff.c (RegisterTIFFImage): Reduce BSS size.</li>
-<li>coders/sfw.c (ReadSFWImage): Make SFW static data completely
-const.</li>
-<li>coders/ps3.c: Make PS3 static data completely const.</li>
-<li>coders/pict.c: Make PICT static data completely const.</li>
-<li>magick/error.c (ThrowException, ThrowLoggedException): Handle
-the case where some passed character strings refer to existing
-exception character strings. Fixes SourceForge issue #603
-"heap-use-after-free in function ThrowLoggedException of
-magick/error.c".
-(CatchException): Restructure so there is one return point.</li>
-<li>coders/miff.c (ImportRLEPixels): Fix heap overflow caused by a
-typo in the code. Also fix undefined behavior caused by large
-left shifts of an unsigned char. Fixes SourceForge issue #608
-"heap-buffer-overflow in ImportRLEPixels of coders/miff.c.</li>
-</ul>
-</blockquote>
-<p>2019-05-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>coders/bmp.c (ReadBMPImage): Fix subrange/scene handling in
-'ping' mode so it is like the other formats. Only the first frame
-was being enumerated while in 'ping' mode.</li>
-</ul>
-</blockquote>
-<p>2019-05-07 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>NEWS.txt: Update news.</li>
-<li>magick/utility.c (ExpandFilenames): Only expand <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>' to a
-list of arguments read from 'filename' if the path <a class="reference external" href="mailto:'%40filename">'<span>@</span>filename</a>'
-does not exist. This fix is made based on an email posting to the
-'graphicsmagick-help' mailing list at SourceForge by "Test User"
-on Tue, 7 May 2019.</li>
-</ul>
-</blockquote>
-<p>2019-05-05 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>magick/colorspace.c: Reorder initialization of colorspace tables
-for a possible performance improvement.</li>
-<li>magick/fx.c (WaveImage): Use float for sin map.</li>
-<li>configure.ac: Test for float versions of math functions.</li>
-<li>magick/gem.c (GenerateDifferentialNoise): Use float versions of
-math functions when available.</li>
-</ul>
-</blockquote>
-<p>2019-05-02 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>www/INSTALL-unix.rst: Expanded configure documentation for
---with-modules. Added specific configure documentation for
---with-umem and --with-mtmalloc, which may be useful on
-Solaris-derived systems.</li>
-</ul>
-</blockquote>
-<p>2019-04-23 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>magick/command.c (VersionCommand): Show OpenMP specification
-version corresponding to version enumeration.</li>
-<li>magick/locale.c (GetLocaleMessageFromTag): Eliminate clang
-warning about comparison with a constant value.</li>
-<li>magick/log.c (InitializeLogInfo): Initialize LogInfo log_configured.</li>
-</ul>
-</blockquote>
-<p>2019-04-21 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>magick/magic.c (struct): Ajust StaticMagic definition to be more
-const-friendly.</li>
-<li>magick/color_lookup.c (struct): Adjust StaticColors definition
-to be more const-friendly.</li>
-<li>magick/attribute.c: Ajust tag_table definition to be more
-const-friendly.</li>
-<li>magick/log.c: Allocate LogInfo from heap as we used to do.</li>
-<li>magick/locale.c (GetLocaleMessageFromTag): Adaptations to locale
-coder output changes.</li>
-<li>coders/locale.c (WriteLOCALEImage): Adjust locale coder output
-to be more const.</li>
-</ul>
-</blockquote>
-<p>2019-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>magick/color_lookup.c: Make built-in color tables fully const.</li>
-<li>magick/animate.c: Use MagickXTextViewWidgetNDL() to display help
-text.</li>
-<li>magick/display.c: Use MagickXTextViewWidgetNDL() to display help
-text.</li>
-<li>magick/widget.c (MagickXTextViewWidgetNDL): New private function
-to display multi-line null-delimited text in an X11 widget.</li>
-<li>coders/xwd.c (ReadXWDImage): Added even more XWD header
-validation logic. Addresses problems noted by email from Hongxu
-Chen to the graphicsmagick-security mail alias on Fri, 19 Apr 2019
-and Sat, 20 Apr 2019 and entitled "Multiple crashes (FPE and
-invalid read) when processing XWD files".</li>
-</ul>
-</blockquote>
-<p>2019-04-17 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>coders/xwd.c (ReadXWDImage): Added even more XWD header
-validation logic. Addresses problems noted by email from Hongxu
-Chen to the graphicsmagick-security mail alias on Wed, 17 Apr 2019
-and entitled "Multiple crashes (FPE and invalid read) when
-processing XWD files". Also addresses additional issues noted
-that an attacker could request to allocate an arbitrary amount of
-memory based on ncolors and the claimed header size.</li>
-</ul>
-</blockquote>
-<p>2019-04-14 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>coders/xwd.c (ReadXWDImage): Add more XWD header validation
-logic. Addresses problems noted by email from Hongxu Chen to the
-graphicsmagick-security mail alias on Sun, 14 Apr 2019 and
-entitled "Multiple crashes (FPE and invalid read) when processing
-XWD files".</li>
-</ul>
-</blockquote>
-<p>2019-04-13 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>coders/pdb.c (WritePDBImage): Assure that input scanline is
-cleared in order to cover up some decoder bug. May fix 14215
-"graphicsmagick/coder_PDB_fuzzer: Use-of-uninitialized-value in
-WritePDBImage", which I have not been able to reproduce.</li>
-<li>magick/render.c (DrawPrimitive): Check primitive point x/y
-values for NaN.
-(DrawImage): Fix oss-fuzz issue 14173
-"graphicsmagick/coder_MVG_fuzzer: Integer-overflow in DrawImage".</li>
-<li>magick/pixel_cache.c (SetNexus): Fix oss-fuzz issue 14208
-"graphicsmagick/coder_MVG_fuzzer: Integer-overflow in SetNexus".</li>
-</ul>
-</blockquote>
-<p>2019-04-11 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>magick/display.c: Add even more const declarations.</li>
-<li>coders/mat.c (WriteMATLABImage): Add completely missing error
-handling. Fixes SourceForge issue #604 "heap-buffer-overflow in
-function WriteMATLABImage of coders/mat.c".</li>
-</ul>
-</blockquote>
-<p>2019-04-10 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>coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
-"heap-buffer-overflow in function WritePDBImage of coders/pdb.c".</li>
-<li>magick/widget.c: Add many const declarations.</li>
-<li>magick/display.c: Incorporate and eliminate display.h. Add many
-const declarations.</li>
-<li>magick/animate.c: Incorporate and eliminate animate.h. Add many
-const declarations.</li>
-</ul>
-</blockquote>
-<p>2019-04-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>coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
-bounding box. Fixes SourceForge issue #606 "Division by Zero in
-coders/wmf.c".</li>
-</ul>
-</blockquote>
-<p>2019-04-07 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
-<blockquote>
-<ul class="simple">
-<li>magick/nt_base.c Fix a problem of finding ghostscript fonts.
-Variable "font_dir" was useless and thus removed. No need to copy
-text multiple times. Use const char gs_font_dir[] instead of
-pointer.</li>
-</ul>
-</blockquote>
-<p>2019-04-07 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>coders/xwd.c (ReadXWDImage): Perform more header validations and
-a file size validation in order to reject files with bogus
-headers.
-(WriteXWDImage): Fix SourceForge issue #599
-"heap_buffer_overflow_WRITE in function WriteXWDImage of
-coders/xwd.c".</li>
-</ul>
-</blockquote>
-<p>2019-04-05 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>coders/svg.c (SVGStartElement): Fix stack buffer overflow while
-parsing quoted font family value. Fixes SourceForge issue #600
-"stack-buffer-overflow in function SVGStartElement of
-coders/svg.c".</li>
-<li>coders/miff.c (ReadMIFFImage): Detect end of file while reading
-RLE packets. Fixes SourceForge issue #598 "heap-buffer-overflow
-in function ReadMIFFImage of coders/miff.c".</li>
-</ul>
-</blockquote>
-<p>2019-04-03 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>coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
-reading DirectClass XWD file. Fixes SourceForge issue #597
-"heap-buffer-overflow in function ReadXWDImage of coders/xwd.c".</li>
-</ul>
-</blockquote>
-<p>2019-04-02 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>coders/png.c (ReadMNGImage): Fix small buffer overflow (one
-PixelPacket) of image colormap. Fixes SourceForge issue #596
-"heap-buffer-overflow in function CloneImage of magick/image.c".</li>
-<li>magick/colormap.c (ReallocateImageColormap): New function to
-reallocate an image colormap.</li>
-<li>coders/logo.c: Make more static data const.</li>
-<li>magick/module_aliases.h: Make more static data const.</li>
-<li>magick/static.c: Make more static data const.</li>
-</ul>
-</blockquote>
-<p>2019-04-01 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>magick/log.c (LogMagickEventList): Log elapsed time with
-microsecond precision.</li>
-</ul>
-</blockquote>
-<p>2019-03-31 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>coders/mpc.c (ReadMPCImage): Deal with a profile length of zero,
-or an irrationally large profile length. Fixes SourceForge issue
-#601 "memory leak in function ReadMPCImage of coders/mpc.c ".</li>
-<li>magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
-case that the memory allocation for window->segment_info
-fails. Fixes SourceForge #595 "use allocate memory before null
-check" as pertains to magick/xwindow.c.</li>
-<li>magick/segment.c (Classify): Add check for memory allocation
-failure when allocating cluster array. Fixes SourceForge #595 "use
-allocate memory before null check" as pertains to
-magick/segment.c.</li>
-<li>coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
-null check. Fixes SourceForge #595 "use allocate memory before
-null check" as pertains to coders/pdb.c.</li>
-</ul>
-</blockquote>
-<p>2019-03-30 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>magick/pixel_cache.c (AllocateThreadViewSet): Simplify the image
-view model by adding NexusInfo to the View structure (rather than
-referencing it via a pointer) to lessen the number of required
-per-thread allocations and to improve locality of reference.</li>
-</ul>
-</blockquote>
-<p>2019-03-22 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>coders/wpg.c (WPG1_Palette): Change to a static declaration.</li>
-<li>coders/dcm.c: dicom_info array is now fully in the data segment.</li>
-</ul>
-</blockquote>
-<p>2019-03-18 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>configure.ac: Add support for using the Solaris mtmalloc
-library. This is primarily for testing or as an alternative to
-Solaris umem.
-Stop using posix_memalign() until it is uniformly more mature and
-reliably quick.</li>
-</ul>
-</blockquote>
-<p>2019-03-17 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>magick/pixel_cache.c (SetNexus): Smallest staging-area
-allocation is cache line size so declare it as such.</li>
-<li>magick/fx.c: Functions in the fx module which return a new Image
-should return a null Image if an exception was thrown. Also,
-assure that user has an opportunity to see the exception which was
-thrown.</li>
-<li>magick/error.c (ThrowLoggedException): Throwing an exception is
-now thread-safe.</li>
-<li>magick/pixel_cache-private.h: Moved pixel cache private
-definitions to private header.</li>
-</ul>
-</blockquote>
-<p>2019-03-10 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>magick/pixel_cache.c (SetNexus): Pass x, y, columns, and rows
-rather than a pointer to RectangleInfo. This should be easier to
-inline on modern CPUs.</li>
-</ul>
-</blockquote>
-<p>2019-03-09 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>magick/pixel_cache.c (SetNexus): Cache resource limits in
-CacheInfo rather than repeatedly calling into the resource code in
-order to lessen the overhead of performing resource limit checks
-on the pixel cache views.</li>
-<li>magick/resource.c (AcquireMagickResource): Use a lock for each
-resource in order to lessen contention. Return a maximum 64-bit
-integer value if the resource has not been limited. Previously
-returned -1 in this case but this was not documented.</li>
-</ul>
-</blockquote>
-<p>2019-03-07 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>magick/import.c (ImportViewPixelArea): If range between max and
-min is less than MagickEpsilon, produce a black image rather than
-throwing an exception.</li>
-<li>coders/mat.c (ReadMATImage): Fix memory leak on unexpected end
-of file. Fixes oss-fuzz 13556 "graphicsmagick/coder_MAT_fuzzer:
-Direct-leak in ReadMATImage". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-06 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>coders/mat.c (ReadMATImage): Quit if image scanlines are not
-fully populated due to exception. Fixes oss-fuzz 13530
-"graphicsmagick/coder_MAT_fuzzer: Use-of-uninitialized-value in
-InsertComplexFloatRow". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-04 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>coders/txt.c (ReadTXTImage): Don't start new line if x_max <
-x_min. Avoids calling SetImagePixels() with a width of zero.
-Related to oss-fuzz 13521 "graphicsmagick/coder_TEXT_fuzzer:
-Floating-point-exception in SetNexus". (Credit to OSS-Fuzz)</li>
-<li>magick/pixel_cache.c (SetNexus): Report error for empty region
-rather than crashing due to divide by zero exception. This is a
-new bug due to yesterday's changes. Fixes oss-fuzz 13521
-"graphicsmagick/coder_TEXT_fuzzer: Floating-point-exception in
-SetNexus". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-03 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>design/pixel-cache.dot: Update design dot diagram to remove
-IsNexusInCore and add CompositeCacheNexus.</li>
-<li>magick/pixel_cache.c (SetNexus): Apply resource limits to pixel
-nexus allocations using the same limits (total pixels, width,
-height, memory) as applied to the whole image since some requests
-are directly influenced by the input file. Add yet more tests for
-arithmetic overflow. Whole source module is re-arranged so that
-static functions are in order of dependency so that forward
-prototype declarations are no longer needed. Fixes oss-fuzz 13210
-"graphicsmagick/coder_MVG_fuzzer: Integer-overflow in
-SetNexus". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-02 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>magick/pixel_cache.c (OpenCache): Use unsigned 64-bit value to
-store CacheInfo offset and length as well as for the total pixels
-calculation. Add some more arithmetic overflow detections.</li>
-<li>coders/topol.c (ReadTOPOLImage): Report a corrupt image
-exception "Unexpected end-of-file" if reader encounters end of
-file while reading header rows. Addresses oss-fuzz 7981
-"graphicsmagick/coder_TOPOL_fuzzer: Use-of-uninitialized-value in
-InsertRow". (Credit to OSS-Fuzz)</li>
-<li>coders/mat.c (ReadMATImage): Report a corrupt image exception
-"Unexpected end-of-file" if reader encounters end of file while
-reading scanlines. Also added some helpful traces. Hopefully
-addresses oss-fuzz 13445 "graphicsmagick/coder_MAT_fuzzer:
-Use-of-uninitialized-value in IsGrayImage". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-26 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>magick/image.h ("C"): Include as "magick/image-private.h" as the
-other headers are.
-("C"): Include "magick/image-private.h" inside the protective
-MAGICK_IMPLEMENTATION guard, as it should have been. This error
-broke the oss-fuzz build.</li>
-</ul>
-</blockquote>
-<p>2019-02-24 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>magick/image-private.h (_ImageExtra): Put ImageExtra definition
-in a private header file so that its definition may be accessed
-directly by library internals. Add some accessor macros to
-provide access and update code to use them.</li>
-<li>coders/wpg.c (ReallocColormap): Make sure that there is not a
-heap overwrite if the number of colors has been reduced. Thanks
-to Jaroslav Fojtik for giving me a heads up about this.</li>
-</ul>
-</blockquote>
-<p>2019-02-23 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>magick/monitor.c (MagickMonitorActive): Add new private function
-to test if a progress monitor is active. Update all progress
-monitor code in loops to use this information, while also updating
-code to hopefully address concerns expressed by Hongxu Chen about
-data races on the graphicsmagick-bugs mailing list starting on
-February 6, 2019.</li>
-</ul>
-</blockquote>
-<p>2019-02-21 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>coders/mpc.c (ReadMPCImage): Tally directory length to avoid
-death by strlen().</li>
-<li>coders/miff.c (ReadMIFFImage): Tally directory length to avoid
-death by strlen(). Fixes oss-fuzz 13190
-"graphicsmagick/coder_MIFF_fuzzer: Timeout in
-graphicsmagick_coder_MIFF_fuzzer". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-17 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>coders/svg.c (ReadSVGImage): Don't call xmlCleanupParser()
-in module code since this may cause other libxml users to fail.</li>
-<li>coders/msl.c (ProcessMSLScript): Don't call xmlCleanupParser()
-in module code since this may cause other libxml users to fail.</li>
-<li>magick/render.c (DrawDashPolygon): (DrawDashPolygon): Don't read
-beyond end of dash pattern array. This is a second instance of
-issue identified by SourceForge issue #591. Fixes oss-fuzz 13160
-"graphicsmagick/coder_MVG_fuzzer: Heap-buffer-overflow in
-DrawDashPolygon". The earlier attempt to fix this problem today
-broke dash patterns entirely. (Credit to OSS-Fuzz)</li>
-<li>magick/annotate.c (RenderFreetype): Eliminate memory leak of
-GlyphInfo.image (type FT_Glyph) while rendering some FreeType
-fonts such as the one we use now in the Magick++ test suite.</li>
-</ul>
-</blockquote>
-<p>2019-02-16 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>magick/render.c (DrawDashPolygon): Avoid reading one beyond
-length of dash pattern array, which is terminated by value 0.0.
-Fixes SourceForge issue #591 "Heap buffer overflow in
-DrawDashPolygon when parsing SVG images".
-(DrawPrimitive): Add arithmetic overflow checks when converting
-computed coordinates from 'double' to 'long'.
-(DrawImage): Don't destroy draw_info in graphic_context when
-draw_info has not been allocated yet. Problem reported via email
-by Sami Supperi on Thu, 14 Feb 2019.</li>
-<li>coders/jpeg.c (ReadJPEGImage): JPEG files are observed to
-provide compression ratios as high as 2500 so allow for that.
-Also, the test for "Unreasonable dimensions" delivered yesterday
-was flawed since magick_rows and magick_columns are only set if a
-desired image size was provided. Fixes SourceForge issue 592
-"Non-malicious JPEG file fails with "Unreasonable dimensions"".</li>
-<li>coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
-for images where photometic is PHOTOMETRIC_RGB. Fixes oss-fuzz
-13115 "graphicsmagick/coder_PTIF_fuzzer:
-Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
-OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-15 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>coders/jpeg.c (ReadJPEGImage): Base test for "Unreasonable
-dimensions" on original JPEG dimensions and not the scaled
-dimensions. Fixes SourceForge issue 593 "gm convert: Insufficient
-image data in file when hinting input image".</li>
-</ul>
-</blockquote>
-<p>2019-02-13 Troy Patteson <<a class="reference external" href="mailto:troyp%40ieee.org">troyp<span>@</span>ieee<span>.</span>org</a>></p>
-<blockquote>
-<ul class="simple">
-<li>PerlMagick/Magick.xs (Mogrify): Add decorate argument to Annotate.</li>
-<li>PerlMagick/Magick.xs (Mogrify): Remove reference to undefined
-Annotate argument.</li>
-</ul>
-</blockquote>
-<p>2019-02-12 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>coders/tiff.c (ReadTIFFImage): For planar TIFF, make sure that
-pixels are initialized in case some planes are missing. Fixes
-oss-fuzz 13046 "graphicsmagick/coder_PTIF_fuzzer:
-Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
-OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-11 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>coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
-returning. Similar to ImageMagick CVE-2019-7397 "In ImageMagick
-before 7.0.8-25, several memory leaks exist in WritePDFImage in
-coders/pdf.c.". Thanks to Petr Gajdos for bringing this issue to
-our attention.</li>
-</ul>
-</blockquote>
-<p>2019-02-10 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>coders/wpg.c (ReadWPGImage): Use a different way to reallocate
-the colormap which preserves existing content, but also updates
-image->colors and assures that added palette entries are
+<li>coders/caption.c (ReadCAPTIONImage): Assure that metrics are
initialized.</li>
-<li>coders/png.c (ReadMNGImage): Bound maximum loop iterations by
-subrange as a primitive means of limiting resource consumption.
-This should finally resolve oss-fuzz 12738
-"graphicsmagick/enhance_fuzzer: Out-of-memory in
-graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)</li>
-<li>coders/tiff.c (ReadTIFFImage): Assure that opacity channel is
-initialized in the RGBAStrippedMethod case. Convert
-'CorruptImageError' encountered while testing for more frames to
-'CorruptImageWarning' so we return the frames already read.
-Second try at fixing oss-fuzz 11896
-"graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
-VerticalFilter".</li>
-<li>coders/dpx.c (AttributeToString): Eliminate clang
-"-Wstring-plus-int" warning observed in oss-fuzz build.</li>
-<li>coders/cineon.c (AttributeToString): Eliminate clang
-"-Wstring-plus-int" warning observed in oss-fuzz build.</li>
-</ul>
-</blockquote>
-<p>2019-02-09 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>coders/pict.c (DecodeImage): Avoide a one-byte over-read of
-pixels heap allocation. The cause of the over-read is not yet
-understood. Fixes oss-fuzz 12019
-"graphicsmagick/coder_PICT_fuzzer: Heap-buffer-overflow in
-ExpandBuffer". (Credit to OSS-Fuzz)</li>
-<li>coders/wpg.c (ReadWPGImage): Assure that all colormap entries
-are initialized. Fixes oss-fuzz 12614
-"graphicsmagick/enhance_fuzzer: Use-of-uninitialized-value in
-EnhanceImage". (Credit to OSS-Fuzz)</li>
-<li>coders/tiff.c (ReadTIFFImage): Make sure that image is in
-DirectClass mode and ignore any claimed colormap when the image is
-read using the RGBAStrippedMethod, RGBATiledMethod, or
-RGBAPuntMethod cases. Fixes oss-fuzz 12195
-"graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
-ExportGrayQuantumType". (Credit to OSS-Fuzz)</li>
-<li>coders/miff.c (ReadMIFFImage): Improve pixel buffer calculations
-to defend against overflow. Assure that zlib and bzlib decode the
-expected number of bytes for a pixel row. Fixes oss-fuzz issue
-12448 "graphicsmagick/coder_MIFF_fuzzer:
-Use-of-uninitialized-value in RGBTransformPackets". (Credit to
-OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-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>coders/png.c (ReadMNGImage): Quit processing and report error
-upon failure to insert MNG background layer. Fixes oss-fuzz 12738
-"graphicsmagick/enhance_fuzzer: Out-of-memory in
-graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-03 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>coders/dib.c (ReadDIBImage, WriteDIBImage): Improve buffer-size
-calculations to guard against buffer overflows. The reader
-version was not as complete as it should have been, whereas the
-writer version did not guard against arithmetic overflow at all.</li>
-<li>coders/bmp.c (ReadBMPImage, WriteBMPImage): Improve buffer-size
-calculations to guard against buffer overflows. This is a
-follow-on fix to the previous fix submitted for SourceForge issue
-#582 "heap-buffer-overflow in ReadBMPImage of bmp.c" which is now
-also identified as CVE-2018-20185.</li>
-<li>www/Hg.rst: Updates to reflect current usage and availability.</li>
-<li>www/authors.rst: Promote Troy Patteson to the active contributor
-category.</li>
-</ul>
-</blockquote>
-<p>2019-02-01 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>magick/version.h.in: Rotate ChangeLog and update copyright
-statements for the new year.</li>
+<li>magick/pixel_cache.c (DestroyThreadViewSet): Check if views
+pointer is not null before destroying views.</li>
+<li>coders/xpm.c (ReadXPMImage): Properly detect the case where the
+XPM colormap is not fully initialized.</li>
+<li>coders/pict.c (DecodeImage): Fix heap buffer over-reads. Fixes
+oss-fuzz issue 20053 "graphicsmagick:coder_PICT_fuzzer:
+Heap-buffer-overflow in ExpandBuffer" and oss-fuzz issue 20048
+"graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
+DecodeImage". Both of these oss-fuzz issues appeared due to
+recent changes since the last release.</li>
+<li>coders/meta.c (WriteMETAImage): Assure that 'iptc_offset' is
+initialized and valid.</li>
+<li>coders/jpeg.c (ReadJPEGImage): Assure that evaluating the
+embedded profile length does not suffer from undefined behavior.</li>
</ul>
</blockquote>
-<p>2019-01-30 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>
+<p>2020-01-12 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>coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
-support WebP 'use_sharp_yuv' option ("if needed, use sharp (and
-slow) RGB->YUV conversion") via <cite>-define webp:use-sharp-yuv=true</cite>.</li>
+<li>magick/render.c (DrawImage): Add more MVG parser validations.</li>
</ul>
</blockquote>
-<p>2019-01-05 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>
+<p>2020-01-11 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>magick/pixel_cache.c (SetNexus): Merge IsNexusInCore()
-implementation code into SetNexus() and add check for if
-cache_info->pixels is null. Fixes SourceForge issue #588 "Bug in
-IsNexusInCore()".</li>
-<li>configure.ac (DcrawExtraOptions): Request TIFF output from dcraw
-if build supports TIFF format in order to obtain more metadata.
-This allows obtaining some metadata from standard TIFF tags
-(e.g. camera make, model, and dcraw version), and any attached ICC
-profile, but not specifically EXIF data since we don't support
-extracting EXIF data from TIFF yet. Inspired by SourceForge issue
-589 "Identify lack of data (no Exif) in RAW formats".</li>
+<li>coders/histogram.c (WriteHISTOGRAMImage): Histogram coder was
+relying on the previously removed '@' file inclusion feature to
+insert the histogram comment text. Write a PseudoClass MIFF image
+with RLE compression. Fixes SourceForge issue #622 "Histogram
+produces incorrect color table attribute ".</li>
+<li>magick/pixel_cache.c (ModifyCache): Re-open the pixel cache if
+the cache rows/columns do not match the owning image rows/columns.</li>
+<li>magick/transform.c (TransformImage): TransformImage now returns
+a MagickPassFail return status value rather than void.</li>
+<li>coders/pict.c (ReadPICTImage): Fix some over-strict validations
+which were preventing some PICT files which were previously read
+successfully from being accepted. Fix problems which occurred when
+the clipping rectangle changed the image size. Improve reading
+embedded JPEG blobs. Now successfully reads all raster PICT files
+I have available.</li>
+</ul>
+</blockquote>
+<p>2020-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>coders/pict.c (ReadPICTImage): Be more strict about PICT
+rectangle by treating rectangle dimensions as if they are a 16-bit
+signed type and not allowing negative values. Avoid GCC warnings
+which sprung up similar to "warning: comparison is always false
+due to limited range of data type".</li>
+</ul>
+</blockquote>
+<p>2020-01-05 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>coders/sfw.c (ReadSFWImage): Restore a DestroyImage() statement
+which was accidentally deleted by recent edits. Fixes oss-fuzz
+"Issue 19819 in oss-fuzz: graphicsmagick:coder_SFW_fuzzer:
+Indirect-leak in AllocateImage".</li>
+<li>coders/png.c (WriteOneJNGImage): Detect when JPEG encoder has
+failed, and throw exception. Fix image dimension limit
+validations. Stop discarding exception report. Fixes SourceForge
+bug #621 "Assertion in WriteBlob at magick/blob.c:4937" which was
+reported by Suhwan Song.</li>
+<li>coders/pict.c (WritePICTImage): Eliminating small buffer overrun
+when run-length encoding pixels. Fixes SourceForge bug #620
+"heap-buffer-overflow in EncodeImage at coders/pict.c:1114" which
+was reported by Suhwan Song.</li>
+<li>coders/logo.c (ReadLOGOImage): PATTERN error handling was
+incomplete. Add appropriate error handling.
+(ReadLOGOImage): Switch to using ConstituteTextureImage() rather
+than TextureImage() since it is more appropriate for this purpose.
+(ReadLOGOImage): Oops! Accidental change of behavior. When size
+is not supplied, simply return the pattern image.</li>
+</ul>
+</blockquote>
+<p>2020-01-04 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>coders/*.c (ReadFOOImage): Stop image timer just before
+returning from reader so that reported timings are correct when
+used in the future.</li>
+</ul>
+</blockquote>
+<p>2020-01-03 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>magick/timer.c (StartTimer): Expose previously existing
+StartTimer() function.
+(StopTimer): Expose previously existing StartTimer() function.</li>
+<li>magick/constitute.c (WriteImage): Don't over-write time-stamp
+when output is to INFO format.</li>
+</ul>
+</blockquote>
+<p>2020-01-03 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40seznam.cz">JaFojtik<span>@</span>seznam<span>.</span>cz</a>></p>
+<blockquote>
+<ul class="simple">
+<li>VisualMagickconfigureconfigure.exe: Should not depend on mfcr90.dll.
+It is too bad when end user cannot run this tool because of missing DLL.</li>
+<li>VisualMagickconfigureconfigure.cpp Make speed optimisation as default
+option.</li>
+<li>VisualMagickconfigureconfigure.vcproj Give different filename to debug
+build to avoid accidental committing debug build to repository.</li>
+</ul>
+</blockquote>
+<p>2020-01-01 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>coders/dpx.c (GenerateDPXTimeStamp): Use reentrant localtime_r()
+function if it is available.</li>
+<li>magick/log.c (LogMagickEventList): Use reentrant
+localtime_r() function if it is available.</li>
+<li>coders/cineon.c (GenerateCineonTimeStamp): Use reentrant
+localtime_r() function if it is available.</li>
+<li>coders/mat.c (WriteMATLABImage): Use reentrant localtime_r()
+function if it is available.</li>
+<li>coders/pdf.c (WritePDFImage): Use reentrant localtime_r()
+function if it is available.</li>
+<li>coders/ps.c (WritePSImage): Use reentrant ctime_r() function
+if it is available.</li>
+<li>coders/ps2.c (WritePS2Image): Use reentrant ctime_r() function
+if it is available.</li>
+<li>coders/ps3.c (WritePS3Image): Use reentrant ctime_r() function
+if it is available.</li>
+<li>configure.ac: Test for getpwnam_r().</li>
+<li>magick/utility.c (ExpandFilename): Use reentrant getpwnam_r()
+function if it is available.</li>
+<li>magick/magick.c (InitializeMagickSignalHandlers): Use the normal
+termination signal handler for SIGXCPU and SIGXFSZ so that ulimit
+or setrlimit(2) may be used to apply CPU (RLIMIT_CPU) and output
+file size (RLIMIT_FSIZE) limits with the normal cleanup, and
+without dumping core. Note that any output files currently being
+written may be truncated and files being written by external
+programs (e.g. Ghostscript) might be left behind unless they are
+to a temporary file assigned by GraphicsMagick.</li>
+<li>coders/xpm.c (ReadXPMImage): Promote a color-lookup
+warning to an error.</li>
+<li>coders/xc.c (ReadXCImage): Promote a color-lookup
+warning to an error.</li>
+<li>coders/null.c (ReadNULLImage): Promote a color-lookup
+warning to an error.</li>
+<li>Makefile.am: Rotate ChangeLogs for the new year.</li>
+<li>coders/gradient.c (ReadGRADIENTImage): Promote a color-lookup
+warning to an error.</li>
</ul>
</blockquote>
</div>
-2019-12-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - NEWS.txt: Updates in preparation for 1.3.34 release.
+ - version.sh: Updates in preparation for the 1.3.35 release.
+ Merge changes for 1.3.35 into GraphicsMagick-1\_3 branch.
-2019-12-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - www/INSTALL-windows.rst: Update Windows installation and build
+ documentation.
- - NEWS.txt: Update with changes since the last GM release.
+2020-02-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/png.c (png\_read\_raw\_profile): Use size\_t type to store
- profile length and 'nibbles'. Use safer way to test for profile
- buffer overflow.
- (ReadOnePNGImage): Use size\_t type to store 'ping\_rowbytes',
- 'length', and 'row\_offset'. Check png\_pixels allocation for
- arithemetic overflow when computing the required allocation size.
+ - NEWS.txt: Update with News since previous release.
- - coders/tiff.c (WriteNewsProfile): Use size\_t type to store
- profile length.
-
- - coders/pict.c (WritePICTImage): Avoid 'alloc-size-larger-than'
- warning from GCC when allocating row\_bytes.
-
-2019-12-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - tiff/libtiff/tiffconf.h: Add standard/common libtiff 'SUPPORT'
- options which are used in full-fledged Autoconf/Cmake libtiff
- builds but were missing from the Visual C template file. In
- particular, WebP is now supported and JBIG is somewhat supported.
-
- - VisualMagick/jbig/libjbig/LIBRARY.txt (EXCLUDE): Remove
- tstcodec85.c from JBIG library build.
-
- - VisualMagick/configure/configure.cpp: Add JBIG library to
- include path when building libraries. Add WebP as a dependency
- when building libtiff.
-
-2019-12-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/nt\_base.h ("C"): Assume that float versions of functions
- became available in Visual Studio 2008.
-
-2019-12-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/log.c (InitializeLogInfo): Using the compiled-in
- defaults, always log to stderr by default, even under Microsoft
- Windows. The logging output may then be diverted to
- 'win32eventlog' as soon as a log.mgk file is loaded if that is
- desired. This should not be much of a problem because loading a
- log.mgk file is the first thing that the library attempts to do.
- This change is made due to users and developers being baffled at
- not seeing any log output due to the log output going to the (very
- unfriendly) Windows application log.
-
- - webp: libwebp is updated to the 1.0.3 release.
-
-2019-12-15 Fojtik Jaroslav <JaFojtik@seznam.cz>
-
- - magick/nt\_base.c Fix user only installation of Ghostscript.
-
-2019-12-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - rungm.sh.in (DIRSEP): DIRSEP should always use Unix conventions for
- Autotools-based builds.
-
- - magick/module.h ("C"): Eliminiate redundant and conflicting
- ListModuleInfo() prototype.
-
- - coders/miff.c (ReadMIFFImage): Eliminate warnings in trace
- statements.
-
- - coders/dib.c (DecodeImage): Eliminate warnings in trace
- statements.
-
- - coders/bmp.c (DecodeImage): Eliminate warnings in trace
- statements.
-
- - magick/studio.h (SupportMagickModules): Fix the preprocessor
- logic controlling SupportMagickModules, which became broken for
- GCC MinGW-based builds starting in the 1.3.29 release when a
- "static" module loader was implemented. Due to an error in the
- preprocessor logic, only the "modules" based build was working for
- MinGW. Much thanks to Giovanni Remigi for making us aware of this
- issue.
-
-2019-12-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/pict.c (WritePICTImage): Throw a writer exception if the
- PICT width limit is exceeded. Fixes SourceForge issue 617
- "heap-buffer-overflow in function EncodeImage of coders/pict.c".
-
-2019-12-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - jbig: jbigkit is updated to 2.1 release.
-
- - libxml: libxml2 is updated to 2.9.10 release.
-
- - bzlib: bzip is updated to 1.0.8 release.
-
- - zlib: zlib is updated to 1.2.11 release.
-
- - png: libpng is updated to 1.6.37 release.
-
-2019-12-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - lcms: lcms2 is updated to 2.9 release.
-
- - tiff: libtiff is updated to 4.1.0 release.
-
-2019-11-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (DrawPatternPath): Don't leak memory if
- fill\_pattern or stroke\_pattern of cloned draw\_info are not null.
- Fixes oss-fuzz issue 18948 "graphicsmagick:coder\_MVG\_fuzzer:
- Indirect-leak in CloneImage".
- (PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
- memory.
-
-2019-11-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
- 17986 "graphicsmagick:coder\_JPG\_fuzzer: Heap-buffer-overflow in
- GenerateEXIFAttribute". This problem likely only happens in
- 32-bit builds.
-
-2019-11-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (ReadMNGImage): Only magnify the image if the
- requested magnification methods are supported.
-
-2019-11-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/compress.c (HuffmanDecodeImage): Fix signed overflow on
- range check which leads to heap overflow in 32-bit
- applications. Requires a relatively large file input compared with
- typical fuzzer files (greater than a megabyte) to trigger.
- Problem reported to the graphicsmagick-security mail address by
- Justin Tripp on 2019-11-13.
- (Ascii85Tuple): Fix thread safety issue by requiring caller to
- pass in tuple buffer as an argument and having callers allocate
- tuple buffer on the stack.
-
-2019-11-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/bit\_stream.c: Add restrict declarations to slightly
- improve performance and decrease code size.
-
- - TclMagick/pkgIndex.tcl: Incorporate recommendations from third
- problem noted in SourceForge issue #420 "TclMagick issues and
- patch". This is supposed to help support using an uninstalled
- GraphicsMagick and allow the installation path to contain a space.
-
- - wand/magick\_wand.c (MagickClearException): Destroy any existing
- exception info before re-initializing the exception info or else
- there will be a memory leak.
-
- - TclMagick/generic/libttkcommon.c (myMagickError): Clear
- exception from the Wand after it has been reported. Addresses the
- fourth problem noted by SourceForge issue #420 "TclMagick issues
- and patch". However, MagickClearException() already clears an
- exception in the Wand, so a new function is not needed.
-
- - TclMagick/unix/m4/tcl.m4: Change hard-coded INSTALL path to
- point to config/install-sh. Re-generated/updated Autotools stuff
- by executing the genconf.sh script. Addresses the first problem
- noted by SourceForge issue #420 "TclMagick issues and patch".
-
-2019-11-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/pixel\_cache.c (SetNexus): Eliminate warning about
- possibly uninitialized variable from primordial GCC 3.4.3.
-
- - magick/render.c (ConvertPrimitiveToPath): Eliminate warning that
- IsClosedSubPath might be used uninitialized.
-
- - magick/common.h ("MAGICK\_FALLTHROUGH"): Added a
- MAGICK\_FALLTHROUGH macro to support the GCC/Clang fallthrough
- attribute when the time comes again that it would be useful.
-
-2019-10-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/pcx.c (ReadPCXImage): Verify that pixel region is not
- negative. Assure that opacity channel is initialized to
- opaqueOpacity. Update DirectClass representation while
- PseudoClass representation is updated. Improve read performance
- with uncompressed PCX.
-
-2019-10-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/xpm.c (ReadXPMImage): Image properties are expected to
- appear within the first 512 bytes of the XPM file header. fixes
- oss-fuzz 18267 "graphicsmagick:coder\_PICON\_fuzzer: Timeout in
- coder\_PICON\_fuzzer".
-
-2019-10-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - configure.ac: Fix tcmalloc configuration report.
-
-2019-10-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/wpg.c (ReadWPGImage): Implement subimage/subrange
- support.
-
- - coders/mat.c (ReadMATImage, ReadMATImageV4): Implement
- subimage/subrange support. Should resolve oss-fuzz 14999
- "graphicsmagick/coder\_MAT\_fuzzer: Out-of-memory in
- graphicsmagick\_coder\_MAT\_fuzzer".
-
- - coders/tiff.c (TIFFMapBlob): Fix compile problem if
- LOG\_TIFF\_BLOB\_IO is defined.
-
- - coders/wpg.c (ExtractPostscript): Improve performance. Avoid
- temporary files if possible. Avoid additional memory allocations
- if possible. Should address oss-fuzz issue 18173
- "graphicsmagick:enhance\_fuzzer: Timeout in enhance\_fuzzer" and
- oss-fuzz issue 17714 "graphicsmagick:coder\_WPG\_fuzzer: Timeout in
- coder\_WPG\_fuzzer".
-
-2019-10-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/pnm.c (PNMInteger): Place a generous arbitrary limit on
- the amount of PNM comment text to avoid denial of service
- opportunity. Fixes oss-fuzz 18162 "Timeout · coder\_PNM\_fuzzer".
-
-2019-10-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/dps.c (ReadDPSImage): Fix memory leak when OpenBlob()
- reports failure. Same as ImageMagick CVE CVE-2019-16709.
-
-2019-09-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/attribute.c (GenerateEXIFAttribute): Skip
- unsupported/invalid format 0. Fixes oss-fuzz issue 17597
- "graphicsmagick:coder\_SFW\_fuzzer: Heap-buffer-overflow in
- GenerateEXIFAttribute".
-
-2019-09-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - fuzzing/oss-fuzz-build.sh: Change by Alex Gaynor so that the
- correct oss-fuzz fuzzing engine should be used.
-
-2019-09-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/static.c (OpenModule): Static module loader should use
- upper-cased magick string when searching for a module alias.
- Fixes SourceForge issue #613 "static module loader is still
- case-sensitive".
-
-2019-09-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - configure.ac: Report status of zstd (FaceBook Zstandard)
- compression in configuration summary.
-
-2019-09-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (TraceArcPath): Substitute a lineto command when
- tracing arc is impossible. Fixes oss-fuzz 10765
- "graphicsmagick/coder\_MVG\_fuzzer: Divide-by-zero in TraceArcPath".
-
-2019-09-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (png\_read\_raw\_profile): Fix validation of raw
- profile length. Fixes oss-fuzz 16906
- "graphicsmagick:coder\_ICO\_fuzzer: Out-of-memory in
- graphicsmagick\_coder\_ICO\_fuzzer".
-
- - coders/wpg.c (ReallocColormap): Avoid dereferencing a null
- pointer if image->colormap is null. Fixes oss-fuzz 17004
- "graphicsmagick:coder\_WPG\_fuzzer: Null-dereference READ in
- ReallocColormap".
-
-2019-09-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/memory.c (MagickRealloc): Add a note that the behavior of
- this function is as described for BSD reallocf(3), which is now
- appearing in Linux's GNU libc and elsewhere.
-
-2019-09-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - www/OpenMP.rst: Document the significant OpenMP speed-up which
- may be obtained by using an alternate memory allocation library.
- Currently 'tcmalloc', 'mtmalloc', and 'umem' are supported as
+ - magick/magick.c (InitializeMagickSignalHandlers): This private
+ implementation function is now a static function as it should have
+ been.
+ (InitializeMagickEx): New function which may be used in place of
+ InitializeMagick() to initialize GraphicsMagick. This
+ initialization function returns an error status value, may update
+ a passed ExceptionInfo structure with error information, and
+ provides an options parameter which supports simple bit-flags to
+ tailor initialization. The signal handler registrations are
+ skipped if the MAGICK\_OPT\_NO\_SIGNAL\_HANDER flag is set in the
options.
- - www/INSTALL-unix.rst: Document new --with-tcmalloc option to
- enable using Google gperftools tcmalloc library.
-
- - configure.ac: Add support for using Google gperftools tcmalloc
- library via the --with-tcmalloc option.
-
- - scripts/rst2htmldeco.py: Port to Python 3 syntax and require at
- least Python 2.6.
-
- - scripts/relpath.py: Port to Python 3 syntax and require
- at least Python 2.6.
-
- - scripts/html\_fragments.py: Port to Python 3 syntax and require
- at least Python 2.6.
-
- - scripts/format\_c\_api\_doc.py: Port to Python 3 syntax and require
- at least Python 2.6.
-
-2019-08-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - doc/GraphicsMagick.imdoc: Document gm utility exit status codes.
-
-2019-08-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (PRIMITIVE\_INFO\_POINTS\_MAX): SIZE\_MAX apparently
- rounds up by one when cast to a double on 64-bit systems. Due to
- this, and in order to set more rational implementation limits, add
- a PRIMITIVE\_INFO\_POINTS\_MAX definition which computes and
- constrains the maximum number of PrimitiveInfo entries allowed.
-
-2019-08-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/attribute.c (GenerateEXIFAttribute): Check that we are
- not being directed to read an IFD that we are already parsing and
- quit in order to avoid a loop. Addresses oss-fuzz 15753
- "graphicsmagick/coder\_JPEG\_fuzzer: Timeout in
- graphicsmagick\_coder\_JPEG\_fuzzer" and 16068
- "graphicsmagick/coder\_SFW\_fuzzer: Timeout in
- graphicsmagick\_coder\_SFW\_fuzzer".
-
- - tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
- irritating GCC 9 "\_\_builtin\_strncpy' output may be truncated"
- warnings due to copying MaxTextExtent-1 characters. Instead
- request copying all of the characters and also assure that string
- is still null terminated.
-
- - doc/environment.imdoc: Update documentation pertaining to HOME
- and MAGICK\_DEBUG environment variables.
-
-2019-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/log.c (DestroyLogInfo): Only output text to terminate an
- XML format log file if XML format is active.
-
-2019-08-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (ExtractTokensBetweenPushPop): Previous fix for
- non-terminal loop was broken by a last-minute untested edit.
- Finally addresses oss-fuzz 15318 "graphicsmagick/coder\_MVG\_fuzzer:
- Timeout in graphicsmagick\_coder\_MVG\_fuzzer".
-
-2019-08-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - fuzzing/utils.cc (MemoryResource): Lessen the memory limit used
- for oss-fuzz testing in order to provide more headroom and margin
- for error.
-
- - magick/render.c (TraceBezier): Detect arithmetic overflow and
- return errors via normal error path rather than exiting. Fixes
- oss-fuzz 16450 "graphicsmagick:coder\_MVG\_fuzzer: Unexpected-exit
- in DefaultFatalErrorHandler".
- (PrimitiveInfoRealloc): Implement more paranoid code related to
- primitive allocation.
-
-2019-08-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (DrawStrokePolygon): Handle case where
- TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
- "graphicsmagick/coder\_MVG\_fuzzer: ASSERT: primitive\_info !=
- (PrimitiveInfo \*) NULL".
- (DrawDashPolygon): Handle case where DrawStrokePolygon() returns
- MagickFail. Also needed to address oss-fuzz 15516, since otherwise
- test-cases run for a very long time.
- (ExtractTokensBetweenPushPop): Fix non-terminal parsing loop.
- Addresses oss-fuzz 15318 "graphicsmagick/coder\_MVG\_fuzzer: Timeout
- in graphicsmagick\_coder\_MVG\_fuzzer".
-
-2019-08-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/memory.h (MagickMallocAlignedArray): Add function
- attributes for added value and to quench GCC 9 warning with
- special build options enabled.
-
- - magick/deprecate.h (AcquireMemory): Add more function attributes
- to quench GCC 9 warning with special build options enabled.
-
- - magick/attribute.c (GenerateEXIFAttribute): Fix compilation
- warning in 32-bit build.
-
- - coders/dpx.c (AttributeToString): Eliminate annoying warnings
- from GCC 9, although the code was correct.
-
- - coders/msl.c (MSLStartElement): Fix defective opacity percentage
- code revealed by GCC 9 warning.
-
-2019-08-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (ReadMNGImage): Skip coalescing layers if there is
- only one layer. Fixes oss-fuzz 16274
- "graphicsmagick/coder\_MNG\_fuzzer: Unexpected-exit in
- DefaultFatalErrorHandler".
-
-2019-08-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (ReadPNGImage): Post-processing to convert the
- image type in the PNG reader based on a specified magick prefix
- string is now disabled. This can (and should) be done after the
- image has been returned. Fixes oss-fuzz 16386
- "graphicsmagick:coder\_PNG8\_fuzzer: Timeout in
- graphicsmagick\_coder\_PNG8\_fuzzer".
-
-2019-07-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - NEWS.txt: Updates in preparation for 1.3.33 release.
-
-2019-07-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - NEWS.txt: Updated NEWS to reflect updates since last release.
-
-2019-07-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (WriteOnePNGImage): Fix saving to palette when
- image has an alpha channel but no color is marked as transparent.
- Patch submitted by Przemysław Sobala via SourceForge patch #61
- "WriteOnePNGImage(): Fix saving to palette when image has an alpha
- channel but no color is marked as transparent".
-
- - doc/options.imdoc (characters): Fix -format documentation to
- reflect that '%r' returns the image type. Patch submitted by
- Przemysław Sobala via SourceForge patch #60 "Fix documentation
- typo".
-
-2019-07-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/tempfile.c (AcquireTemporaryFileDescriptor): Fix
- compilation under Cygwin. Patch by Marco Atzeri and submitted via
- email to the graphicsmagick-help mailing list on Fri, 5 Jul 2019.
-
-2019-06-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/attribute.c (GenerateEXIFAttribute): Added range checks
- and tracing. Fixes oss-fuzz 14998
- "graphicsmagick/coder\_JPEG\_fuzzer: Heap-buffer-overflow in
- Read32s". This is a tiny read overflow.
-
- - coders/miff.c (ReadMIFFImage): Similar fix as to mpc.c
-
- - coders/mpc.c (ReadMPCImage): Fix faulty signed overflow logic
- for profiles[i].length which still allowed overflow. Fixes
- oss-fuzz issue 15190 "graphicsmagick/coder\_MPC\_fuzzer:
- Out-of-memory in graphicsmagick\_coder\_MPC\_fuzzer".
-
- - doc/options.imdoc: Add notes about security hazards due to
- commands which support a '@filename' syntax.
-
- - www/security.rst: Add notes about security hazards due to
- commands which support a '@filename' syntax.
-
-2019-06-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (DrawImage): Assure that 'token' is initialized.
- Fixes oss-fuzz issue 14897 "graphicsmagick/coder\_MVG\_fuzzer:
- Use-of-uninitialized-value in DrawImage".
-
- - magick/animate.c (MagickXAnimateImages): Fix memory leak of
- scene\_info.pixels.
-
- - magick/display.c (MagickXDisplayImage): Fix heap overwrite of
- windows->image.name and windows->image.icon\_name buffers. It
- appears that the code assumed that CloneString() would always
- allocated a string at least MaxTextExtent in size. I assume that
- this issue has existed for a very long time since CloneString()
- was re-written many years ago.
-
- - coders/caption.c (ReadCAPTIONImage): The CAPTION reader did not
- appear to work at all any more. Now it works again, but still not
- very well.
+2020-02-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/command.c: Re-implement '@' file inclusion support for
- -comment, -draw, -format, and -label which was removed for the
- 1.3.32 release. Note that arguments from untrusted sources will
- still need to be sanitized to detect attempts to subvert this
- feature to access file data, but this feature has always been
- supported by GraphicsMagick and it originated early in the
- development of ImageMagick.
+ - magick/magick.c (MagickToMime): Add a MIME translation for
+ "jpg". Issue reported by Pro Turm.
-2019-06-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/utility.c (MagickStrlCat, MagickStrlCpy): Add debug
- checks enabled by MAGICK\_STRL\_CHECK.
+ - www/INSTALL-windows.rst: Add quoting to avoid losing backslashes
+ in Windows paths.
- - magick/montage.c (MontageImages): Fix wrong length argument to
- strlcat() when building montage directory, which could allow heap
- overwrite.
+2020-02-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/png.c (RegisterPNGImage): Pass correct size value to
- strlcat(). Under Apple's OS X (and possibly other targets)
- strlcat() writes bytes beyond what it needs to (but within the
- range it is allowed to) causing a crash due to the wrong limit
- value. Fixes SourceForge issue #609 `gm identify foo.png` crashes
- on macOS (v 1.3.32).
+ - magick/common.h: Add missing unsupported handling for some
+ recently added GCC/Clang attributes.
- - www/Changes.rst: Update ChangeLog links due to new year, and
- 1.3.32 release.
+ - magick/: Move all remaining private implementation code in
+ public headers which is guarded by MAGICK\_IMPLEMENTATION into
+ private headers, which are never installed.
-2019-06-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/bmp.c (WriteBMPImage): Detect arithmetic overflow of
- image\_size. Add more tracing. Reduce compilation warnings.
- (EncodeImage): Reduce compilation warnings.
- (WriteBMPImage): Assure that chromaticity uses double-precision
- for multiply before casting to unsigned integer.
+ - coders/tiff.c (WriteTIFFImage): Evidence suggests that large
+ strip sizes improve performance by reducing the number of I/Os.
+ The defaults suggested by libtiff are way to small for today's
+ images and computers. Default TIFF strip sizes so that each
+ uncompressed strip consumes up to 1MiB of memory, or 4MiB for FAX
+ oriented codecs, or based on LZMA compression level when using
+ LZMA compression. The default size may be adjusted via the
+ TIFF\_BYTES\_PER\_STRIP preprocessor definition.
- - coders/wpg.c (ReallocColormap): Reduce compilation warnings.
+2020-02-09 Fojtik Jaroslav <JaFojtik@seznam.cz>
- - coders/braille.c (WriteBRAILLEImage): Reduce compilation
- warnings.
+ - coders/wpg.c ZeroFillMissing data will never been triggered when
+ y>=image->rows.
- - coders/dib.c (WriteDIBImage): Detect arithmetic overflow of
- image\_size. Reduce compilation warnings.
- (EncodeImage): Reduce compilation warnings.
+2020-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/locale.c (WriteLOCALEImage): Reduce compilation warnings.
+ - magick/render.c (DrawImage): Limit pattern dimensions by
+ LONG\_MAX rather than ULONG\_MAX since this seems more likely to
+ avoid arithmetic overflows later on.
-2019-06-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-09 Fojtik Jaroslav <JaFojtik@seznam.cz>
- - Makefile.am (dist-zstd): Use the maximum possible compression
- level (22) when creating a Zstd-compressed tarball to get close to
- lzip/xz compression levels.
+ - coders/wpg.c Check for exception in image.
- - coders/tiff.c (ReadTIFFImage): Fix typo in initialization of
- 'tile' pointer variable.
+2020-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - version.sh: Updates in preparation for 1.3.32 release.
+ - magick/command.c (VersionCommand): Add Google perftools tcmalloc
+ to the available feature support.
-2019-06-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - www/INSTALL-unix.rst: Include some information about building
+ with MSYS2.
- - Makefile.am (release): Add a release target to make it easier to
- produce and sign the release files. Add a zstd-compressed output
- tarball just because we can.
+ - coders/png.c (ReadOnePNGImage): Eliminate compilation warnings
+ about signed/unsigned comparisons.
-2019-06-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick/image.c: Remove private global string constants, and one
+ private global unsigned long constant, from the library ABI.
+ Since the global constants were declared via a private header and
+ only used within the GraphicsMagick build, removing these does not
+ impact the public ABI. The globals removed are BackgroundColor,
+ BorderColor, DefaultTileFrame, DefaultTileGeometry,
+ DefaultTileLabel, ForegroundColor, HighlightColor, MatteColor,
+ PSDensityGeometry, PSPageGeometry, and DefaultCompressionQuality.
- - magick/render.c (DrawImage): Fix typo when initializing
- number\_coordinates. Somehow GCC and clang let this typo slip by.
+2020-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-06-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick/render.c (DrawImage): Apply draconian pattern
+ specification offset and dimension validations. Hopefully there
+ is no impact to usability. If so please report it as a bug.
+ Fixes oss-fuzz 20586 "graphicsmagick:coder\_MVG\_fuzzer:
+ Integer-overflow in DrawPolygonPrimitive".
- - coders/dib.c (ReadDIBImage): Preserve PseudoClass opaque
- representation if ICO mask is opaque, otherwise return a
- DirectClass image.
+ - coders/svg.c (ReadSVGImage): Fix dereference of NULL pointer
+ when stopping image timer.
-2019-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/render.c (DrawImage): Detect an error in TracePath() and
- quit rather than forging on.
+ - coders/pict.c (DecodeImage): Allocate extra scanline memory to
+ allow small RLE overrun. Fixes oss-fuzz 20271
+ "graphicsmagick:coder\_PICT\_fuzzer: Heap-buffer-overflow in
+ ExpandBuffer" and 20272 "graphicsmagick:coder\_PICT\_fuzzer:
+ Heap-buffer-overflow in DecodeImage".
-2019-06-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - PerlMagick/t/wmf/read.t: Update WMF reference images. Relax
+ test requirements for ski.wmf.
- - magick/render.c (DrawImage): Terminate drawing if
- DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
- "graphicsmagick/coder\_MVG\_fuzzer: Timeout in
- graphicsmagick\_coder\_MVG\_fuzzer".
- (TracePath): Terminate path parsing upon first parsing error.
+ - locale/C.mgk: Correct error message associated with
+ "UnsupportedNumberOfRows". Patch was submitted by Thorsten
+ Alteholz via private email on 2020-02-05.
-2019-06-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-02-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/txt.c (ReadTXTImage): Use real a new-line character as
- line delimiter rather than '\n' string.
+ - coders/topol.c: Include magick/magick\_endian.h.
- - magick/annotate.c (AnnotateImage): No longer implicitly call
- TranslateText() since this is not suitable for most use-cases and
- causes additional performance impact. The API user can perform
- such translations in advance on the text string using
- TranslateText() if need be. No longer call StringToList() to
- split strings into an array of strings since this can lead to
- unexpected results, and a custom-splitter is more efficient.
+2020-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-06-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick, coders, wand: Added copious casts to avoid possible
+ integer overflows in the Microsoft Windows 64-bit build, where
+ sizeof(long) < sizeof(size\_t).
- - magick/render.c (DrawImage): Only support '@filename' syntax to
- read drawing primitive from a file if we are not already drawing.
+2020-01-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/utility.c (TranslateTextEx): Remove support for reading
- from a file using '@filename' syntax due to security concerns.
- Problem was reported to us by "Battle Furry" via the
- GraphicsMagick security mail alias on June 6, 2019.
+ - magick/render.h ("PrimitiveInfo"): Change PrimitiveInfo
+ coordinates from type 'unsigned long' to 'size\_t'.
-2019-06-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/utility.c (SetClientFilename): Reduce initialized data
- some more.
+ - magick/gradient.c (GradientImage): Warnings reduction, plus note
+ about incorrect diagonal gradients math.
-2019-06-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-20 Fojtik Jaroslav <JaFojtik@seznam.cz>
- - magick/nt\_base.c: Search for n019003l.pfb (the "Helvetica"-like
- font) rather than fonts.dir since fonts.dir is not present in all
- URW font collections.
+ - VisualMagick\configure\configure.cpp Option /arch:SSE2 is
+ available only for 32 bit build.
- - NEWS.txt: Update news.
+2020-01-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-06-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/pcd.c (DecodeImage): Assure that pcd\_length gets
+ initialized with something.
- - coders/logo.c: Tidy logo image definitions, and logo image
- output.
+ - Magick++/lib/Options.cpp (strokeDashArray): Add needless check
+ for \_drawInfo->dash\_pattern null in order to make static analysis
+ happy.
-2019-05-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick/render.c (DestroyPolygonInfo): Make sure to not
+ dereference a null edges pointer.
- - coders/mat.c: Make more data const.
+ - coders/pdb.c (WritePDBImage): Make sure that null comment value
+ is not dereferenced.
-2019-05-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/vid.c (ReadVIDImage): Make sure that
+ ThrowVIDReaderException does not dereference a null pointer.
- - magick/animate.c: Reduce initialized static allocations.
+ - magick/quantize.c (ClassifyImageColors): Fix error handling so a
+ null pointer won't be consumed after a memory allocation failure.
+ Changed the location of some variable declarations and added some
+ comments.
- - magick/display.c: Reduce initialized static allocations.
+2020-01-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/widget.c (MagickSplitNDLTextToList): Add static
- implementation function.
-
-2019-05-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/webp.c (RegisterWEBPImage): Use sprintf to format version
- since snprintf is not available in old Visual Studio.
-
-2019-05-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/dcm.c: Make more data const.
-
- - www/INSTALL-unix.rst: Add documentation for how to install URW
- fonts from various package management systems.
-
-2019-05-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - www/authors.rst: Add authorship attribution to Samuel Thibault
- for contributing support for the Braille image format.
-
- - coders/braille.c: Add support for Braille image format by Samuel
- Thibault. Patch submitted via SourceForge patch #59 "Add braille
- image format support.
-
-2019-05-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/tempfile.c: Make more data const.
-
- - magick/signature.c: Make more data const.
-
- - magick/quantize.c: Make more data const.
-
- - magick/attribute.c: Make more data const.
-
- - coders/png.c: Make more data const.
-
- - coders/mpeg.c: Make more data const.
-
- - coders/wmf.c: Make more data const.
-
- - coders/tile.c: Make more data const.
-
-2019-05-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/enum\_strings.c: Make more data const.
-
-2019-05-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/magick.c: Make more data const.
-
- - magick/type.c (GetTypeInfoByFamily): Make more data const.
-
- - magick/unix\_port.c (MagickGetMMUPageSize): Decrease initialized
- data.
-
- - magick/utility.c (GetPageGeometry): Make more data const.
-
- - coders/pdf.c (WritePDFImage): Allocate working buffer on stack
- and pass as argument to EscapeParenthesis() to eliminate a thread
- safety problem and also reduce BSS size.
-
- - coders/webp.c (RegisterWEBPImage): Fix compiler warning.
-
- - coders/jbig.c (RegisterJBIGImage): Make more data const.
-
- - coders/pict.c (DecodeImage): Allocate output buffer used by
- ExpandBuffer() on the stack rather than as static data private to
- ExpandBuffer(). Eliminates a thread safety problem and also
- reduces BSS size.
-
- - coders/webp.c (RegisterWEBPImage): Reduce BSS size.
-
-2019-05-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/jp2.c: Make more data const.
-
- - coders/wmf.c: Make more data const.
-
- - coders/ps.c (WritePSImage): Make more data const.
-
- - coders/ps2.c (WritePS2Image): Make more data const.
-
-2019-05-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/static.c: Revert to previous 'name' storage. Callback
- functions in structure block being properly const.
-
- - coders/xpm.c: Make more data const.
-
- - coders/pnm.c: Make more data const.
-
- - coders/palm.c: Make more data const.
-
- - coders/meta.c: Make more data const.
-
- - coders/dcraw.c: Make more data const.
-
- - magick/command.c: Fix compilation problem when HasX11 is not
- defined.
-
-2019-05-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/command.c: Make more data const.
-
-2019-05-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/webp.c (RegisterWEBPImage): Make more data const.
-
- - coders/svg.c (RegisterSVGImage): Reduce BSS size.
-
- - coders/miff.c (RegisterMIFFImage): Fix version reporting.
-
- - coders/ttf.c (RegisterTTFImage): Fixed reporting of FreeType
- version.
-
- - coders/tiff.c (RegisterTIFFImage): Reduce BSS size.
-
- - coders/sfw.c (ReadSFWImage): Make SFW static data completely
- const.
-
- - coders/ps3.c: Make PS3 static data completely const.
-
- - coders/pict.c: Make PICT static data completely const.
-
- - magick/error.c (ThrowException, ThrowLoggedException): Handle
- the case where some passed character strings refer to existing
- exception character strings. Fixes SourceForge issue #603
- "heap-use-after-free in function ThrowLoggedException of
- magick/error.c".
- (CatchException): Restructure so there is one return point.
-
- - coders/miff.c (ImportRLEPixels): Fix heap overflow caused by a
- typo in the code. Also fix undefined behavior caused by large
- left shifts of an unsigned char. Fixes SourceForge issue #608
- "heap-buffer-overflow in ImportRLEPixels of coders/miff.c.
-
-2019-05-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/bmp.c (ReadBMPImage): Fix subrange/scene handling in
- 'ping' mode so it is like the other formats. Only the first frame
- was being enumerated while in 'ping' mode.
-
-2019-05-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - NEWS.txt: Update news.
-
- - magick/utility.c (ExpandFilenames): Only expand '@filename' to a
- list of arguments read from 'filename' if the path '@filename'
- does not exist. This fix is made based on an email posting to the
- 'graphicsmagick-help' mailing list at SourceForge by "Test User"
- on Tue, 7 May 2019.
-
-2019-05-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/colorspace.c: Reorder initialization of colorspace tables
- for a possible performance improvement.
-
- - magick/fx.c (WaveImage): Use float for sin map.
-
- - configure.ac: Test for float versions of math functions.
-
- - magick/gem.c (GenerateDifferentialNoise): Use float versions of
- math functions when available.
-
-2019-05-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - www/INSTALL-unix.rst: Expanded configure documentation for
- --with-modules. Added specific configure documentation for
- --with-umem and --with-mtmalloc, which may be useful on
- Solaris-derived systems.
-
-2019-04-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/command.c (VersionCommand): Show OpenMP specification
- version corresponding to version enumeration.
-
- - magick/locale.c (GetLocaleMessageFromTag): Eliminate clang
- warning about comparison with a constant value.
-
- - magick/log.c (InitializeLogInfo): Initialize LogInfo log\_configured.
-
-2019-04-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/magic.c (struct): Ajust StaticMagic definition to be more
- const-friendly.
-
- - magick/color\_lookup.c (struct): Adjust StaticColors definition
- to be more const-friendly.
-
- - magick/attribute.c: Ajust tag\_table definition to be more
- const-friendly.
-
- - magick/log.c: Allocate LogInfo from heap as we used to do.
-
- - magick/locale.c (GetLocaleMessageFromTag): Adaptations to locale
- coder output changes.
-
- - coders/locale.c (WriteLOCALEImage): Adjust locale coder output
- to be more const.
-
-2019-04-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/color\_lookup.c: Make built-in color tables fully const.
-
- - magick/animate.c: Use MagickXTextViewWidgetNDL() to display help
- text.
-
- - magick/display.c: Use MagickXTextViewWidgetNDL() to display help
- text.
-
- - magick/widget.c (MagickXTextViewWidgetNDL): New private function
- to display multi-line null-delimited text in an X11 widget.
-
- - coders/xwd.c (ReadXWDImage): Added even more XWD header
- validation logic. Addresses problems noted by email from Hongxu
- Chen to the graphicsmagick-security mail alias on Fri, 19 Apr 2019
- and Sat, 20 Apr 2019 and entitled "Multiple crashes (FPE and
- invalid read) when processing XWD files".
-
-2019-04-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/xwd.c (ReadXWDImage): Added even more XWD header
- validation logic. Addresses problems noted by email from Hongxu
- Chen to the graphicsmagick-security mail alias on Wed, 17 Apr 2019
- and entitled "Multiple crashes (FPE and invalid read) when
- processing XWD files". Also addresses additional issues noted
- that an attacker could request to allocate an arbitrary amount of
- memory based on ncolors and the claimed header size.
-
-2019-04-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/xwd.c (ReadXWDImage): Add more XWD header validation
- logic. Addresses problems noted by email from Hongxu Chen to the
- graphicsmagick-security mail alias on Sun, 14 Apr 2019 and
- entitled "Multiple crashes (FPE and invalid read) when processing
- XWD files".
-
-2019-04-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/pdb.c (WritePDBImage): Assure that input scanline is
- cleared in order to cover up some decoder bug. May fix 14215
- "graphicsmagick/coder\_PDB\_fuzzer: Use-of-uninitialized-value in
- WritePDBImage", which I have not been able to reproduce.
-
- - magick/render.c (DrawPrimitive): Check primitive point x/y
- values for NaN.
- (DrawImage): Fix oss-fuzz issue 14173
- "graphicsmagick/coder\_MVG\_fuzzer: Integer-overflow in DrawImage".
-
- - magick/pixel\_cache.c (SetNexus): Fix oss-fuzz issue 14208
- "graphicsmagick/coder\_MVG\_fuzzer: Integer-overflow in SetNexus".
-
-2019-04-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/display.c: Add even more const declarations.
-
- - coders/mat.c (WriteMATLABImage): Add completely missing error
- handling. Fixes SourceForge issue #604 "heap-buffer-overflow in
- function WriteMATLABImage of coders/mat.c".
-
-2019-04-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
- "heap-buffer-overflow in function WritePDBImage of coders/pdb.c".
-
- - magick/widget.c: Add many const declarations.
-
- - magick/display.c: Incorporate and eliminate display.h. Add many
- const declarations.
-
- - magick/animate.c: Incorporate and eliminate animate.h. Add many
- const declarations.
-
-2019-04-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
- bounding box. Fixes SourceForge issue #606 "Division by Zero in
- coders/wmf.c".
-
-2019-04-07 Fojtik Jaroslav <JaFojtik@seznam.cz>
-
- - magick/nt\_base.c Fix a problem of finding ghostscript fonts.
- Variable "font\_dir" was useless and thus removed. No need to copy
- text multiple times. Use const char gs\_font\_dir[] instead of
- pointer.
-
-2019-04-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/xwd.c (ReadXWDImage): Perform more header validations and
- a file size validation in order to reject files with bogus
- headers.
- (WriteXWDImage): Fix SourceForge issue #599
- "heap\_buffer\_overflow\_WRITE in function WriteXWDImage of
- coders/xwd.c".
-
-2019-04-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/svg.c (SVGStartElement): Fix stack buffer overflow while
- parsing quoted font family value. Fixes SourceForge issue #600
- "stack-buffer-overflow in function SVGStartElement of
- coders/svg.c".
-
- - coders/miff.c (ReadMIFFImage): Detect end of file while reading
- RLE packets. Fixes SourceForge issue #598 "heap-buffer-overflow
- in function ReadMIFFImage of coders/miff.c".
-
-2019-04-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
- reading DirectClass XWD file. Fixes SourceForge issue #597
- "heap-buffer-overflow in function ReadXWDImage of coders/xwd.c".
-
-2019-04-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (ReadMNGImage): Fix small buffer overflow (one
- PixelPacket) of image colormap. Fixes SourceForge issue #596
- "heap-buffer-overflow in function CloneImage of magick/image.c".
-
- - magick/colormap.c (ReallocateImageColormap): New function to
- reallocate an image colormap.
-
- - coders/logo.c: Make more static data const.
-
- - magick/module\_aliases.h: Make more static data const.
-
- - magick/static.c: Make more static data const.
-
-2019-04-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/log.c (LogMagickEventList): Log elapsed time with
- microsecond precision.
-
-2019-03-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/mpc.c (ReadMPCImage): Deal with a profile length of zero,
- or an irrationally large profile length. Fixes SourceForge issue
- #601 "memory leak in function ReadMPCImage of coders/mpc.c ".
-
- - magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
- case that the memory allocation for window->segment\_info
- fails. Fixes SourceForge #595 "use allocate memory before null
- check" as pertains to magick/xwindow.c.
-
- - magick/segment.c (Classify): Add check for memory allocation
- failure when allocating cluster array. Fixes SourceForge #595 "use
- allocate memory before null check" as pertains to
- magick/segment.c.
-
- - coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
- null check. Fixes SourceForge #595 "use allocate memory before
- null check" as pertains to coders/pdb.c.
-
-2019-03-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/pixel\_cache.c (AllocateThreadViewSet): Simplify the image
- view model by adding NexusInfo to the View structure (rather than
- referencing it via a pointer) to lessen the number of required
- per-thread allocations and to improve locality of reference.
-
-2019-03-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/wpg.c (WPG1\_Palette): Change to a static declaration.
-
- - coders/dcm.c: dicom\_info array is now fully in the data segment.
-
-2019-03-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/caption.c (ReadCAPTIONImage): Assure that metrics are
+ initialized.
- - configure.ac: Add support for using the Solaris mtmalloc
- library. This is primarily for testing or as an alternative to
- Solaris umem.
- Stop using posix\_memalign() until it is uniformly more mature and
- reliably quick.
+ - magick/pixel\_cache.c (DestroyThreadViewSet): Check if views
+ pointer is not null before destroying views.
-2019-03-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/xpm.c (ReadXPMImage): Properly detect the case where the
+ XPM colormap is not fully initialized.
- - magick/pixel\_cache.c (SetNexus): Smallest staging-area
- allocation is cache line size so declare it as such.
+ - coders/pict.c (DecodeImage): Fix heap buffer over-reads. Fixes
+ oss-fuzz issue 20053 "graphicsmagick:coder\_PICT\_fuzzer:
+ Heap-buffer-overflow in ExpandBuffer" and oss-fuzz issue 20048
+ "graphicsmagick:coder\_PICT\_fuzzer: Heap-buffer-overflow in
+ DecodeImage". Both of these oss-fuzz issues appeared due to
+ recent changes since the last release.
- - magick/fx.c: Functions in the fx module which return a new Image
- should return a null Image if an exception was thrown. Also,
- assure that user has an opportunity to see the exception which was
- thrown.
+ - coders/meta.c (WriteMETAImage): Assure that 'iptc\_offset' is
+ initialized and valid.
- - magick/error.c (ThrowLoggedException): Throwing an exception is
- now thread-safe.
+ - coders/jpeg.c (ReadJPEGImage): Assure that evaluating the
+ embedded profile length does not suffer from undefined behavior.
- - magick/pixel\_cache-private.h: Moved pixel cache private
- definitions to private header.
+2020-01-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-03-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick/render.c (DrawImage): Add more MVG parser validations.
- - magick/pixel\_cache.c (SetNexus): Pass x, y, columns, and rows
- rather than a pointer to RectangleInfo. This should be easier to
- inline on modern CPUs.
+2020-01-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-03-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/histogram.c (WriteHISTOGRAMImage): Histogram coder was
+ relying on the previously removed '@' file inclusion feature to
+ insert the histogram comment text. Write a PseudoClass MIFF image
+ with RLE compression. Fixes SourceForge issue #622 "Histogram
+ produces incorrect color table attribute ".
- - magick/pixel\_cache.c (SetNexus): Cache resource limits in
- CacheInfo rather than repeatedly calling into the resource code in
- order to lessen the overhead of performing resource limit checks
- on the pixel cache views.
+ - magick/pixel\_cache.c (ModifyCache): Re-open the pixel cache if
+ the cache rows/columns do not match the owning image rows/columns.
- - magick/resource.c (AcquireMagickResource): Use a lock for each
- resource in order to lessen contention. Return a maximum 64-bit
- integer value if the resource has not been limited. Previously
- returned -1 in this case but this was not documented.
+ - magick/transform.c (TransformImage): TransformImage now returns
+ a MagickPassFail return status value rather than void.
-2019-03-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/pict.c (ReadPICTImage): Fix some over-strict validations
+ which were preventing some PICT files which were previously read
+ successfully from being accepted. Fix problems which occurred when
+ the clipping rectangle changed the image size. Improve reading
+ embedded JPEG blobs. Now successfully reads all raster PICT files
+ I have available.
- - magick/import.c (ImportViewPixelArea): If range between max and
- min is less than MagickEpsilon, produce a black image rather than
- throwing an exception.
+2020-01-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/mat.c (ReadMATImage): Fix memory leak on unexpected end
- of file. Fixes oss-fuzz 13556 "graphicsmagick/coder\_MAT\_fuzzer:
- Direct-leak in ReadMATImage". (Credit to OSS-Fuzz)
+ - coders/pict.c (ReadPICTImage): Be more strict about PICT
+ rectangle by treating rectangle dimensions as if they are a 16-bit
+ signed type and not allowing negative values. Avoid GCC warnings
+ which sprung up similar to "warning: comparison is always false
+ due to limited range of data type".
-2019-03-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - coders/mat.c (ReadMATImage): Quit if image scanlines are not
- fully populated due to exception. Fixes oss-fuzz 13530
- "graphicsmagick/coder\_MAT\_fuzzer: Use-of-uninitialized-value in
- InsertComplexFloatRow". (Credit to OSS-Fuzz)
+ - coders/sfw.c (ReadSFWImage): Restore a DestroyImage() statement
+ which was accidentally deleted by recent edits. Fixes oss-fuzz
+ "Issue 19819 in oss-fuzz: graphicsmagick:coder\_SFW\_fuzzer:
+ Indirect-leak in AllocateImage".
-2019-03-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/png.c (WriteOneJNGImage): Detect when JPEG encoder has
+ failed, and throw exception. Fix image dimension limit
+ validations. Stop discarding exception report. Fixes SourceForge
+ bug #621 "Assertion in WriteBlob at magick/blob.c:4937" which was
+ reported by Suhwan Song.
- - coders/txt.c (ReadTXTImage): Don't start new line if x\_max <
- x\_min. Avoids calling SetImagePixels() with a width of zero.
- Related to oss-fuzz 13521 "graphicsmagick/coder\_TEXT\_fuzzer:
- Floating-point-exception in SetNexus". (Credit to OSS-Fuzz)
+ - coders/pict.c (WritePICTImage): Eliminating small buffer overrun
+ when run-length encoding pixels. Fixes SourceForge bug #620
+ "heap-buffer-overflow in EncodeImage at coders/pict.c:1114" which
+ was reported by Suhwan Song.
- - magick/pixel\_cache.c (SetNexus): Report error for empty region
- rather than crashing due to divide by zero exception. This is a
- new bug due to yesterday's changes. Fixes oss-fuzz 13521
- "graphicsmagick/coder\_TEXT\_fuzzer: Floating-point-exception in
- SetNexus". (Credit to OSS-Fuzz)
+ - coders/logo.c (ReadLOGOImage): PATTERN error handling was
+ incomplete. Add appropriate error handling.
+ (ReadLOGOImage): Switch to using ConstituteTextureImage() rather
+ than TextureImage() since it is more appropriate for this purpose.
+ (ReadLOGOImage): Oops! Accidental change of behavior. When size
+ is not supplied, simply return the pattern image.
-2019-03-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - design/pixel-cache.dot: Update design dot diagram to remove
- IsNexusInCore and add CompositeCacheNexus.
+ - coders/\*.c (ReadFOOImage): Stop image timer just before
+ returning from reader so that reported timings are correct when
+ used in the future.
- - magick/pixel\_cache.c (SetNexus): Apply resource limits to pixel
- nexus allocations using the same limits (total pixels, width,
- height, memory) as applied to the whole image since some requests
- are directly influenced by the input file. Add yet more tests for
- arithmetic overflow. Whole source module is re-arranged so that
- static functions are in order of dependency so that forward
- prototype declarations are no longer needed. Fixes oss-fuzz 13210
- "graphicsmagick/coder\_MVG\_fuzzer: Integer-overflow in
- SetNexus". (Credit to OSS-Fuzz)
+2020-01-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-2019-03-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick/timer.c (StartTimer): Expose previously existing
+ StartTimer() function.
+ (StopTimer): Expose previously existing StartTimer() function.
- - magick/pixel\_cache.c (OpenCache): Use unsigned 64-bit value to
- store CacheInfo offset and length as well as for the total pixels
- calculation. Add some more arithmetic overflow detections.
+ - magick/constitute.c (WriteImage): Don't over-write time-stamp
+ when output is to INFO format.
- - coders/topol.c (ReadTOPOLImage): Report a corrupt image
- exception "Unexpected end-of-file" if reader encounters end of
- file while reading header rows. Addresses oss-fuzz 7981
- "graphicsmagick/coder\_TOPOL\_fuzzer: Use-of-uninitialized-value in
- InsertRow". (Credit to OSS-Fuzz)
+2020-01-03 Fojtik Jaroslav <JaFojtik@seznam.cz>
- - coders/mat.c (ReadMATImage): Report a corrupt image exception
- "Unexpected end-of-file" if reader encounters end of file while
- reading scanlines. Also added some helpful traces. Hopefully
- addresses oss-fuzz 13445 "graphicsmagick/coder\_MAT\_fuzzer:
- Use-of-uninitialized-value in IsGrayImage". (Credit to OSS-Fuzz)
+ - VisualMagick\configure\configure.exe: Should not depend on mfcr90.dll.
+ It is too bad when end user cannot run this tool because of missing DLL.
-2019-02-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - VisualMagick\configure\configure.cpp Make speed optimisation as default
+ option.
- - magick/image.h ("C"): Include as "magick/image-private.h" as the
- other headers are.
- ("C"): Include "magick/image-private.h" inside the protective
- MAGICK\_IMPLEMENTATION guard, as it should have been. This error
- broke the oss-fuzz build.
+ - VisualMagick\configure\configure.vcproj Give different filename to debug
+ build to avoid accidental committing debug build to repository.
-2019-02-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+2020-01-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- - magick/image-private.h (\_ImageExtra): Put ImageExtra definition
- in a private header file so that its definition may be accessed
- directly by library internals. Add some accessor macros to
- provide access and update code to use them.
+ - coders/dpx.c (GenerateDPXTimeStamp): Use reentrant localtime\_r()
+ function if it is available.
- - coders/wpg.c (ReallocColormap): Make sure that there is not a
- heap overwrite if the number of colors has been reduced. Thanks
- to Jaroslav Fojtik for giving me a heads up about this.
+ - magick/log.c (LogMagickEventList): Use reentrant
+ localtime\_r() function if it is available.
-2019-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/cineon.c (GenerateCineonTimeStamp): Use reentrant
+ localtime\_r() function if it is available.
- - magick/monitor.c (MagickMonitorActive): Add new private function
- to test if a progress monitor is active. Update all progress
- monitor code in loops to use this information, while also updating
- code to hopefully address concerns expressed by Hongxu Chen about
- data races on the graphicsmagick-bugs mailing list starting on
- February 6, 2019.
-
-2019-02-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/mpc.c (ReadMPCImage): Tally directory length to avoid
- death by strlen().
-
- - coders/miff.c (ReadMIFFImage): Tally directory length to avoid
- death by strlen(). Fixes oss-fuzz 13190
- "graphicsmagick/coder\_MIFF\_fuzzer: Timeout in
- graphicsmagick\_coder\_MIFF\_fuzzer". (Credit to OSS-Fuzz)
-
-2019-02-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/svg.c (ReadSVGImage): Don't call xmlCleanupParser()
- in module code since this may cause other libxml users to fail.
+ - coders/mat.c (WriteMATLABImage): Use reentrant localtime\_r()
+ function if it is available.
- - coders/msl.c (ProcessMSLScript): Don't call xmlCleanupParser()
- in module code since this may cause other libxml users to fail.
-
- - magick/render.c (DrawDashPolygon): (DrawDashPolygon): Don't read
- beyond end of dash pattern array. This is a second instance of
- issue identified by SourceForge issue #591. Fixes oss-fuzz 13160
- "graphicsmagick/coder\_MVG\_fuzzer: Heap-buffer-overflow in
- DrawDashPolygon". The earlier attempt to fix this problem today
- broke dash patterns entirely. (Credit to OSS-Fuzz)
-
- - magick/annotate.c (RenderFreetype): Eliminate memory leak of
- GlyphInfo.image (type FT\_Glyph) while rendering some FreeType
- fonts such as the one we use now in the Magick++ test suite.
-
-2019-02-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/render.c (DrawDashPolygon): Avoid reading one beyond
- length of dash pattern array, which is terminated by value 0.0.
- Fixes SourceForge issue #591 "Heap buffer overflow in
- DrawDashPolygon when parsing SVG images".
- (DrawPrimitive): Add arithmetic overflow checks when converting
- computed coordinates from 'double' to 'long'.
- (DrawImage): Don't destroy draw\_info in graphic\_context when
- draw\_info has not been allocated yet. Problem reported via email
- by Sami Supperi on Thu, 14 Feb 2019.
-
- - coders/jpeg.c (ReadJPEGImage): JPEG files are observed to
- provide compression ratios as high as 2500 so allow for that.
- Also, the test for "Unreasonable dimensions" delivered yesterday
- was flawed since magick\_rows and magick\_columns are only set if a
- desired image size was provided. Fixes SourceForge issue 592
- "Non-malicious JPEG file fails with "Unreasonable dimensions"".
-
- - coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
- for images where photometic is PHOTOMETRIC\_RGB. Fixes oss-fuzz
- 13115 "graphicsmagick/coder\_PTIF\_fuzzer:
- Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
- OSS-Fuzz)
+ - coders/pdf.c (WritePDFImage): Use reentrant localtime\_r()
+ function if it is available.
-2019-02-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/ps.c (WritePSImage): Use reentrant ctime\_r() function
+ if it is available.
- - coders/jpeg.c (ReadJPEGImage): Base test for "Unreasonable
- dimensions" on original JPEG dimensions and not the scaled
- dimensions. Fixes SourceForge issue 593 "gm convert: Insufficient
- image data in file when hinting input image".
-
-2019-02-13 Troy Patteson <troyp@ieee.org>
+ - coders/ps2.c (WritePS2Image): Use reentrant ctime\_r() function
+ if it is available.
- - PerlMagick/Magick.xs (Mogrify): Add decorate argument to Annotate.
+ - coders/ps3.c (WritePS3Image): Use reentrant ctime\_r() function
+ if it is available.
- - PerlMagick/Magick.xs (Mogrify): Remove reference to undefined
- Annotate argument.
+ - configure.ac: Test for getpwnam\_r().
-2019-02-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - magick/utility.c (ExpandFilename): Use reentrant getpwnam\_r()
+ function if it is available.
- - coders/tiff.c (ReadTIFFImage): For planar TIFF, make sure that
- pixels are initialized in case some planes are missing. Fixes
- oss-fuzz 13046 "graphicsmagick/coder\_PTIF\_fuzzer:
- Use-of-uninitialized-value in DisassociateAlphaRegion". (Credit to
- OSS-Fuzz)
+ - magick/magick.c (InitializeMagickSignalHandlers): Use the normal
+ termination signal handler for SIGXCPU and SIGXFSZ so that ulimit
+ or setrlimit(2) may be used to apply CPU (RLIMIT\_CPU) and output
+ file size (RLIMIT\_FSIZE) limits with the normal cleanup, and
+ without dumping core. Note that any output files currently being
+ written may be truncated and files being written by external
+ programs (e.g. Ghostscript) might be left behind unless they are
+ to a temporary file assigned by GraphicsMagick.
-2019-02-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/xpm.c (ReadXPMImage): Promote a color-lookup
+ warning to an error.
- - coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
- returning. Similar to ImageMagick CVE-2019-7397 "In ImageMagick
- before 7.0.8-25, several memory leaks exist in WritePDFImage in
- coders/pdf.c.". Thanks to Petr Gajdos for bringing this issue to
- our attention.
+ - coders/xc.c (ReadXCImage): Promote a color-lookup
+ warning to an error.
-2019-02-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ - coders/null.c (ReadNULLImage): Promote a color-lookup
+ warning to an error.
- - coders/wpg.c (ReadWPGImage): Use a different way to reallocate
- the colormap which preserves existing content, but also updates
- image->colors and assures that added palette entries are
- initialized.
+ - Makefile.am: Rotate ChangeLogs for the new year.
- - coders/png.c (ReadMNGImage): Bound maximum loop iterations by
- subrange as a primitive means of limiting resource consumption.
- This should finally resolve oss-fuzz 12738
- "graphicsmagick/enhance\_fuzzer: Out-of-memory in
- graphicsmagick\_enhance\_fuzzer". (Credit to OSS-Fuzz)
-
- - coders/tiff.c (ReadTIFFImage): Assure that opacity channel is
- initialized in the RGBAStrippedMethod case. Convert
- 'CorruptImageError' encountered while testing for more frames to
- 'CorruptImageWarning' so we return the frames already read.
- Second try at fixing oss-fuzz 11896
- "graphicsmagick/coder\_PTIF\_fuzzer: Use-of-uninitialized-value in
- VerticalFilter".
-
- - coders/dpx.c (AttributeToString): Eliminate clang
- "-Wstring-plus-int" warning observed in oss-fuzz build.
-
- - coders/cineon.c (AttributeToString): Eliminate clang
- "-Wstring-plus-int" warning observed in oss-fuzz build.
-
-2019-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/pict.c (DecodeImage): Avoide a one-byte over-read of
- pixels heap allocation. The cause of the over-read is not yet
- understood. Fixes oss-fuzz 12019
- "graphicsmagick/coder\_PICT\_fuzzer: Heap-buffer-overflow in
- ExpandBuffer". (Credit to OSS-Fuzz)
-
- - coders/wpg.c (ReadWPGImage): Assure that all colormap entries
- are initialized. Fixes oss-fuzz 12614
- "graphicsmagick/enhance\_fuzzer: Use-of-uninitialized-value in
- EnhanceImage". (Credit to OSS-Fuzz)
-
- - coders/tiff.c (ReadTIFFImage): Make sure that image is in
- DirectClass mode and ignore any claimed colormap when the image is
- read using the RGBAStrippedMethod, RGBATiledMethod, or
- RGBAPuntMethod cases. Fixes oss-fuzz 12195
- "graphicsmagick/coder\_PTIF\_fuzzer: Use-of-uninitialized-value in
- ExportGrayQuantumType". (Credit to OSS-Fuzz)
-
- - coders/miff.c (ReadMIFFImage): Improve pixel buffer calculations
- to defend against overflow. Assure that zlib and bzlib decode the
- expected number of bytes for a pixel row. Fixes oss-fuzz issue
- 12448 "graphicsmagick/coder\_MIFF\_fuzzer:
- Use-of-uninitialized-value in RGBTransformPackets". (Credit to
- OSS-Fuzz)
-
-2019-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/png.c (ReadMNGImage): Quit processing and report error
- upon failure to insert MNG background layer. Fixes oss-fuzz 12738
- "graphicsmagick/enhance\_fuzzer: Out-of-memory in
- graphicsmagick\_enhance\_fuzzer". (Credit to OSS-Fuzz)
-
-2019-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/dib.c (ReadDIBImage, WriteDIBImage): Improve buffer-size
- calculations to guard against buffer overflows. The reader
- version was not as complete as it should have been, whereas the
- writer version did not guard against arithmetic overflow at all.
-
- - coders/bmp.c (ReadBMPImage, WriteBMPImage): Improve buffer-size
- calculations to guard against buffer overflows. This is a
- follow-on fix to the previous fix submitted for SourceForge issue
- #582 "heap-buffer-overflow in ReadBMPImage of bmp.c" which is now
- also identified as CVE-2018-20185.
-
- - www/Hg.rst: Updates to reflect current usage and availability.
-
- - www/authors.rst: Promote Troy Patteson to the active contributor
- category.
-
-2019-02-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/version.h.in: Rotate ChangeLog and update copyright
- statements for the new year.
-
-2019-01-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
- support WebP 'use\_sharp\_yuv' option ("if needed, use sharp (and
- slow) RGB->YUV conversion") via `-define webp:use-sharp-yuv=true`.
-
-2019-01-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- - magick/pixel\_cache.c (SetNexus): Merge IsNexusInCore()
- implementation code into SetNexus() and add check for if
- cache\_info->pixels is null. Fixes SourceForge issue #588 "Bug in
- IsNexusInCore()".
-
- - configure.ac (DcrawExtraOptions): Request TIFF output from dcraw
- if build supports TIFF format in order to obtain more metadata.
- This allows obtaining some metadata from standard TIFF tags
- (e.g. camera make, model, and dcraw version), and any attached ICC
- profile, but not specifically EXIF data since we don't support
- extracting EXIF data from TIFF yet. Inspired by SourceForge issue
- 589 "Identify lack of data (no Exif) in RAW formats".
+ - coders/gradient.c (ReadGRADIENTImage): Promote a color-lookup
+ warning to an error.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>GraphicsMagick Change Logs</title>
<meta content="GraphicsMagick is a robust collection of tools and libraries to read, write, and manipulate an image in any of the more popular image formats including GIF, JPEG, PNG, PDF, and WebP. With GraphicsMagick you can create GIFs dynamically making it suitable for Web applications. You can also resize, rotate, sharpen, color reduce, or add special effects to an image and save your completed work in the same or differing image format. " name="description" />
<meta content="GraphicsMagick, GM, PerlMagick, Perl Magick, Perl Magic, image processing, software development, TclMagick, Magick++" name="keywords" />
<p>The following are the <tt class="docutils literal">GraphicsMagick</tt> change logs since 2001:</p>
<blockquote>
<ul class="simple">
-<li><a class="reference external" href="Changelog.html">2019</a> (1.3.32, 1.3.33, 1.3.34 released)</li>
+<li><a class="reference external" href="Changelog.html">2020</a> (1.3.35 released)</li>
+<li><a class="reference external" href="ChangeLog-2019.html">2019</a> (1.3.32, 1.3.33, 1.3.34 released)</li>
<li><a class="reference external" href="ChangeLog-2018.html">2018</a> (1.3.28, 1.3.29, 1.3.30, 1.3.31 released)</li>
<li><a class="reference external" href="ChangeLog-2017.html">2017</a> (1.3.26, 1.3.27, 1.3.27a released)</li>
<li><a class="reference external" href="ChangeLog-2016.html">2016</a> (1.3.24, 1.3.25 released)</li>
</ul>
</blockquote>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
image processing, software development, TclMagick, Magick++
.. _GraphicsMagick : index.html
-.. _2019 : Changelog.html
+.. _2020 : Changelog.html
+.. _2019 : ChangeLog-2019.html
.. _2018 : ChangeLog-2018.html
.. _2017 : ChangeLog-2017.html
.. _2016 : ChangeLog-2016.html
The following are the ``GraphicsMagick`` change logs since 2001:
+ * 2020_ (1.3.35 released)
+
* 2019_ (1.3.32, 1.3.33, 1.3.34 released)
* 2018_ (1.3.28, 1.3.29, 1.3.30, 1.3.31 released)
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<li><p class="first">In November 2002, the GraphicsMagick Group created GraphicsMagick
from ImageMagick Studio's ImageMagick and applied the "MIT" style
license:</p>
-<p>Copyright (C) 2002 - 2019 GraphicsMagick Group</p>
+<p>Copyright (C) 2002-2020 GraphicsMagick Group</p>
<p>Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
</pre>
<p>but with -verbose it can report on a large number of properties.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
crossed. The swap-samples option may be supplied when reading or writing
in order to read or write using the necessary sample order.
</dd>
+<dt>gradient:direction={South|North|West|East|NorthWest|NorthEast|SouthWest|SouthEast}</dt>
+<dd>By default, the gradient coder produces a gradient from top to
+bottom ("South"). Since GraphicsMagick 1.3.35, the gradient direction
+may be specified to produce gradient vectors according to a
+gravity-like specification. The arguments are <strong>South</strong> (Top to
+Bottom), <strong>North</strong> (Bottom to Top), <strong>West</strong> (Right to Left),
+<strong>East</strong> (Left to Right), <strong>NorthWest</strong> (Bottom-Right to
+Top-Left), <strong>NorthEast</strong> (Bottom-Left to Top-Right),
+<strong>SouthWest</strong> (Top-Right Bottom-Left), and <strong>SouthEast</strong>
+(Top-Left to Bottom-Right).
+</dd>
<dt>jp2:rate=<value></dt>
<dd>Specify the compression factor to use while writing JPEG-2000
files. The compression factor is the reciprocal of the compression
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<p>
-<strong>Copyright (C) 2002 - 2018 GraphicsMagick Group.</strong> Additional
+<strong>Copyright (C) 2002 - 2020 GraphicsMagick Group.</strong> Additional
copyrights apply. Please see see
http://www.GraphicsMagick.org/Copyright.html for details.
<p>
[<a href="index.html">Home</a>] [<a href="utilities.html">Utilities Index</a>]
<BR>
-<p align=center <a href="Copyright.html">Copyright © GraphicsMagick Group 2002 - 2018</a></p></td>
+<p align=center <a href="Copyright.html">Copyright © GraphicsMagick Group 2002 - 2020</a></p></td>
</tr></table>
</body></html>
<li><a class="reference external" href="https://www.mercurial-scm.org/wiki/TipsAndTricks#Keep_.22My.22_or_.22Their.22_files_when_doing_a_merge">Keep "My" or "Their" files when doing a merge</a></li>
</ul>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2012 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2012 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2012 - 2019
+Copyright |copy| GraphicsMagick Group 2012 - 2020
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
-<title>UNIX/Cygwin/MinGW Compilation</title>
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
+<title>UNIX/Cygwin/MinGW/MSYS2 Compilation</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
<body>
<li><a href="reference.html">Reference</a></li>
</ul>
</div>
-<div class="document" id="unix-cygwin-mingw-compilation">
-<h1 class="title">UNIX/Cygwin/MinGW Compilation</h1>
+<div class="document" id="unix-cygwin-mingw-msys2-compilation">
+<h1 class="title">UNIX/Cygwin/MinGW/MSYS2 Compilation</h1>
<!-- -*- mode: rst -*- -->
<!-- This text is in reStucturedText format, so it may look a bit odd. -->
</ul>
</li>
<li><a class="reference internal" href="#building-under-cygwin" id="id5">Building under Cygwin</a></li>
-<li><a class="reference internal" href="#building-under-mingw-msys" id="id6">Building under MinGW & MSYS</a><ul>
+<li><a class="reference internal" href="#building-under-mingw-msys2" id="id6">Building under MinGW & MSYS2</a><ul>
<li><a class="reference internal" href="#cross-compilation-on-unix-linux-host" id="id7">Cross-compilation On Unix/Linux Host</a></li>
</ul>
</li>
<tt class="docutils literal">make check</tt> includes several tests to verify that C++ exceptions
are working properly.</p>
</div>
-<div class="section" id="building-under-mingw-msys">
-<h1><a class="toc-backref" href="#id6">Building under MinGW & MSYS</a></h1>
-<p>GraphicsMagick may be built using the free MinGW ("Minimalistic GNU for
-Windows") package, available from</p>
+<div class="section" id="building-under-mingw-msys2">
+<h1><a class="toc-backref" href="#id6">Building under MinGW & MSYS2</a></h1>
+<p>GraphicsMagick may easily be built using the free <a class="reference external" href="https://www.msys2.org/">MSYS2</a> distribution which provides GCC compilers,
+libraries, and headers, targeting native Windows along with a
+Unix-like command shell and a package manager ('Pacman') to install
+pre-compiled components. Using the pre-compiled packages, it is
+almost as easy to compile GraphicsMagick under MSYS2 as it is under
+Linux!</p>
+<p>When using MSYS2, requesting to install these packages using 'pacman
+-S' (in addition to compilation tools for C/C++) should result in
+getting up to speed very quicky with a featureful build:</p>
+<p>mingw-w64-x86_64-bzip2, mingw-w64-x86_64-freetype,
+mingw-w64-x86_64-ghostscript, mingw-w64-x86_64-jbigkit,
+mingw-w64-x86_64-lcms2, mingw-w64-x86_64-libjpeg-turbo,
+mingw-w64-x86_64-libpng, mingw-w64-x86_64-libtool,
+mingw-w64-x86_64-libwebp mingw-w64-x86_64-libwmf,
+mingw-w64-x86_64-libxml2, mingw-w64-x86_64-zlib</p>
+<p>GraphicsMagick may also be built using the free MinGW
+("Minimalistic GNU for Windows") package, available from</p>
<blockquote>
<a class="reference external" href="http://www.mingw.org/">http://www.mingw.org/</a></blockquote>
<p>or from</p>
compiler, the CPU type, and the library versions used. The
GraphicsMagick developers use the current release of all dependent
libraries.</p>
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. This text is in reStucturedText format, so it may look a bit odd.
.. See http://docutils.sourceforge.net/rst.html for details.
-=============================
-UNIX/Cygwin/MinGW Compilation
-=============================
+===================================
+UNIX/Cygwin/MinGW/MSYS2 Compilation
+===================================
.. contents::
:local:
``make check`` includes several tests to verify that C++ exceptions
are working properly.
-Building under MinGW & MSYS
----------------------------
+Building under MinGW & MSYS2
+----------------------------
-GraphicsMagick may be built using the free MinGW ("Minimalistic GNU for
-Windows") package, available from
+GraphicsMagick may easily be built using the free `MSYS2
+<https://www.msys2.org/>`_ distribution which provides GCC compilers,
+libraries, and headers, targeting native Windows along with a
+Unix-like command shell and a package manager ('Pacman') to install
+pre-compiled components. Using the pre-compiled packages, it is
+almost as easy to compile GraphicsMagick under MSYS2 as it is under
+Linux!
+
+When using MSYS2, requesting to install these packages using 'pacman
+-S' (in addition to compilation tools for C/C++) should result in
+getting up to speed very quicky with a featureful build:
+
+mingw-w64-x86_64-bzip2, mingw-w64-x86_64-freetype,
+mingw-w64-x86_64-ghostscript, mingw-w64-x86_64-jbigkit,
+mingw-w64-x86_64-lcms2, mingw-w64-x86_64-libjpeg-turbo,
+mingw-w64-x86_64-libpng, mingw-w64-x86_64-libtool,
+mingw-w64-x86_64-libwebp mingw-w64-x86_64-libwmf,
+mingw-w64-x86_64-libxml2, mingw-w64-x86_64-zlib
+
+GraphicsMagick may also be built using the free MinGW
+("Minimalistic GNU for Windows") package, available from
http://www.mingw.org/
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<li><a class="reference internal" href="#installing-from-source-code" id="id16">Installing From Source Code</a><ul>
<li><a class="reference internal" href="#applicability" id="id17">Applicability</a></li>
<li><a class="reference internal" href="#important-notes" id="id18">Important Notes</a></li>
-<li><a class="reference internal" href="#windows-xp-vista-7-visual-c-6-0-through-14-0-compilation" id="id19">Windows XP, Vista, 7 Visual C++ 6.0 through 14.0 Compilation</a></li>
+<li><a class="reference internal" href="#windows-xp-vista-7-visual-c-6-0-through-19-0-compilation" id="id19">Windows XP, Vista, 7 Visual C++ 6.0 through 19.0 Compilation</a></li>
<li><a class="reference internal" href="#environment-variables" id="id20">Environment Variables</a></li>
<li><a class="reference internal" href="#windows-distribution-build-procedure" id="id21">Windows Distribution Build Procedure</a></li>
</ul>
"Helvetica" and "Times Roman" if these fonts are not available as
TrueType fonts. The Ghostscript fonts need to manually installed
with administrator privileges in the Ghostscript installation
-directory (e.g. as "C:Program Filesgsfonts" or "C:Program
-Filesgsgs9.27fonts").</p>
+directory (e.g. as <tt class="docutils literal"><span class="pre">C:\Program</span> Files\gs\fonts</tt> or <tt class="docutils literal">C:Program
+Files\gs\gs9.27\fonts</tt>).</p>
<p>The algorithm used to find the fonts consults the Windows registry
to learn Ghostscript installation paths, and then looks for a
"fonts/n019003l.pfb" file in each path until it finds a match.</p>
<li>Create a desktop icon</li>
<li>Update executable search path</li>
<li>Associate supported file extensions with GraphicsMagick</li>
-<li>Install ImageMagickObject OLE Control for VBscript, Visual Basic,
-and WSH.</li>
</ul>
<p>"Creating a desktop icon" and "Update the executable search path"
are selected by default. The remaining options default to
un-selected. Select the options you prefer.</p>
-<p>Think twice before selecting "<em>Associate supported file extensions with
-GraphicsMagick</em>" since this will set up approximately fifty file
-associations, including common formats like JPEG, GIF, PNG, TIFF, and
-PDF. These file associations will be to the 'gmdisplay' program which
-is suitable for displaying images, but currently offers little more
-than that. Windows XP seems to handle the file associations pretty
-well, allowing you to choose from a list of programs, but older systems
-like Windows NT 4.0 and Windows '98 only support a single association
-per format, which can be quite annoying. Associations for
-GraphicsMagick's native formats (such as <a class="reference external" href="miff.html">MIFF</a>) will
-always be made.</p>
+<p>Think twice before selecting "<em>Associate supported file extensions
+with GraphicsMagick</em>" since this will set up approximately fifty
+file associations, including common formats like JPEG, GIF, PNG,
+TIFF, and PDF. These file associations will be to the 'gmdisplay'
+program which is suitable for displaying images, but currently
+offers little more than that. Associations for GraphicsMagick's
+native formats (such as <a class="reference external" href="miff.html">MIFF</a>) will always be made.</p>
<p>Once you have made your selections, click on "<em>Next></em>" to continue.</p>
</blockquote>
</div>
uninstall function since manually removing it (such as by removing its
installation directory) will leave behind the registry entries and path
settings established at install time.</p>
-<p>Under Windows '95 and Windows '98, use the "<em>Uninstall</em>" entry in the
-GraphicsMagick portion of the Windows start menu to initiate the
-uninstall.</p>
-<p>On NT 4.0 and 5.X -based systems, GraphicsMagick should be removed via
-the "<em>Add or Remove Programs</em>" area of the Windows Control Panel. Select
-the GraphicsMagick package from the list, and click on "<em>Change/Remove</em>"
-to uninstall it.</p>
+<p>GraphicsMagick should be removed via the "<em>Add or Remove Programs</em>"
+area of the Windows Control Panel. Select the GraphicsMagick package
+from the list, and click on "<em>Change/Remove</em>" to uninstall it.</p>
</blockquote>
</div>
<div class="section" id="use-from-another-package-or-program">
<h2><a class="toc-backref" href="#id17">Applicability</a></h2>
<blockquote>
This section provides instructions for building GraphicsMagick
-Microsoft Windows using the Visual C++ (Visual Studio, etc.) IDE. For
-building using the free Cygwin or MinGW compilers, follow the
-instructions in INSTALL-unix.txt.</blockquote>
+Microsoft Windows using the Visual C++ (Visual Studio, etc.)
+IDE. For building using the free Cygwin or MinGW compilers (e.g. as
+part of <a class="reference external" href="https://www.msys2.org/">MSYS2</a>), follow the instructions
+in INSTALL-unix.txt.</blockquote>
</div>
<div class="section" id="important-notes">
<h2><a class="toc-backref" href="#id18">Important Notes</a></h2>
optimization, and the problem is likely to go away (but with less
performance).</blockquote>
</div>
-<div class="section" id="windows-xp-vista-7-visual-c-6-0-through-14-0-compilation">
-<h2><a class="toc-backref" href="#id19">Windows XP, Vista, 7 Visual C++ 6.0 through 14.0 Compilation</a></h2>
+<div class="section" id="windows-xp-vista-7-visual-c-6-0-through-19-0-compilation">
+<h2><a class="toc-backref" href="#id19">Windows XP, Vista, 7 Visual C++ 6.0 through 19.0 Compilation</a></h2>
<blockquote>
<p>The Visual C++ distribution targeted at Windows 2000 through Windows
-8 does not provide any stock workspace (DSW) or project files (DSP)
+10 does not provide any stock workspace (DSW) or project files (DSP)
except for those included with third party libraries. Instead, there
is a "configure" program that must run to create build
environments to satisfy various requirements.</p>
-<p>The configure program resides in VisualMagickconfigure in the
+<p>The configure program resides in <tt class="docutils literal">VisualMagick\configure</tt> in the
GraphicsMagick source tree. A pre-compiled configure.exe is
provided, as well as Visual Studio project files to recompile it
from source code if needed.</p>
<p>Once started, the configure program provides this configuration
dialog after proceeding past the initial notifications screen:</p>
-<img alt="Configure program screen shot" class="align-center" src="configure-target-setup.png" style="width: 512.0px; height: 485.0px;" />
+<img alt="Configure program screen shot" class="align-center" src="configure-target-setup.png" style="width: 498.0px; height: 473.0px;" />
<p>In addition to (or as a replacement to) the above dialog, the
configure.exe program supports these command-line options:</p>
<dl class="docutils">
excluded. This results build using all DLL's for everything and
multi-threaded support (the only option for DLL's).</p>
<p>To do a build for your requirements, simply go to the configure sub-
-directory under VisualMagick and open the configure.dsw workspace (for
-Visual C++ 6.0) or configure.sln (for Visual C++ 7.X or 8.X). Set the
-build configuration to "Release" under the</p>
+directory under VisualMagick and open the configure.dsw workspace
+(for Visual C++ 6.0) or configure.sln (for Visual C++ 7.X through
+9.X). Set the build configuration to "Release" under the</p>
<blockquote>
"Build..., Set Active Configuration..." menu.</blockquote>
<p>Build and execute the configure program and follow the on-screen
<tt class="docutils literal"><span class="pre">GM\VisualMagick\bin\GraphicsMagick-1.3-Q8-dll.exe</span></tt></li>
</ol>
</blockquote>
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</div>
"Helvetica" and "Times Roman" if these fonts are not available as
TrueType fonts. The Ghostscript fonts need to manually installed
with administrator privileges in the Ghostscript installation
- directory (e.g. as "C:\Program Files\gs\fonts" or "C:Program
- Files\gs\gs9.27\fonts").
+ directory (e.g. as ``C:\Program Files\gs\fonts`` or ``C:Program
+ Files\gs\gs9.27\fonts``).
The algorithm used to find the fonts consults the Windows registry
to learn Ghostscript installation paths, and then looks for a
* Associate supported file extensions with GraphicsMagick
- * Install ImageMagickObject OLE Control for VBscript, Visual Basic,
- and WSH.
-
"Creating a desktop icon" and "Update the executable search path"
are selected by default. The remaining options default to
un-selected. Select the options you prefer.
- Think twice before selecting "*Associate supported file extensions with
- GraphicsMagick*" since this will set up approximately fifty file
- associations, including common formats like JPEG, GIF, PNG, TIFF, and
- PDF. These file associations will be to the 'gmdisplay' program which
- is suitable for displaying images, but currently offers little more
- than that. Windows XP seems to handle the file associations pretty
- well, allowing you to choose from a list of programs, but older systems
- like Windows NT 4.0 and Windows '98 only support a single association
- per format, which can be quite annoying. Associations for
- GraphicsMagick's native formats (such as `MIFF <miff.html>`_) will
- always be made.
+ Think twice before selecting "*Associate supported file extensions
+ with GraphicsMagick*" since this will set up approximately fifty
+ file associations, including common formats like JPEG, GIF, PNG,
+ TIFF, and PDF. These file associations will be to the 'gmdisplay'
+ program which is suitable for displaying images, but currently
+ offers little more than that. Associations for GraphicsMagick's
+ native formats (such as `MIFF <miff.html>`_) will always be made.
Once you have made your selections, click on "*Next>*" to continue.
installation directory) will leave behind the registry entries and path
settings established at install time.
- Under Windows '95 and Windows '98, use the "*Uninstall*" entry in the
- GraphicsMagick portion of the Windows start menu to initiate the
- uninstall.
-
- On NT 4.0 and 5.X -based systems, GraphicsMagick should be removed via
- the "*Add or Remove Programs*" area of the Windows Control Panel. Select
- the GraphicsMagick package from the list, and click on "*Change/Remove*"
- to uninstall it.
+ GraphicsMagick should be removed via the "*Add or Remove Programs*"
+ area of the Windows Control Panel. Select the GraphicsMagick package
+ from the list, and click on "*Change/Remove*" to uninstall it.
Use From Another Package or Program
-----------------------------------
-------------
This section provides instructions for building GraphicsMagick
- Microsoft Windows using the Visual C++ (Visual Studio, etc.) IDE. For
- building using the free Cygwin or MinGW compilers, follow the
- instructions in INSTALL-unix.txt.
+ Microsoft Windows using the Visual C++ (Visual Studio, etc.)
+ IDE. For building using the free Cygwin or MinGW compilers (e.g. as
+ part of `MSYS2 <https://www.msys2.org/>`_), follow the instructions
+ in INSTALL-unix.txt.
Important Notes
---------------
optimization, and the problem is likely to go away (but with less
performance).
-Windows XP, Vista, 7 Visual C++ 6.0 through 14.0 Compilation
+Windows XP, Vista, 7 Visual C++ 6.0 through 19.0 Compilation
------------------------------------------------------------
The Visual C++ distribution targeted at Windows 2000 through Windows
- 8 does not provide any stock workspace (DSW) or project files (DSP)
+ 10 does not provide any stock workspace (DSW) or project files (DSP)
except for those included with third party libraries. Instead, there
is a "configure" program that must run to create build
environments to satisfy various requirements.
- The configure program resides in VisualMagick\configure in the
+ The configure program resides in ``VisualMagick\configure`` in the
GraphicsMagick source tree. A pre-compiled configure.exe is
provided, as well as Visual Studio project files to recompile it
from source code if needed.
dialog after proceeding past the initial notifications screen:
.. image:: configure-target-setup.png
- :height: 485px
- :width: 512px
+ :height: 473px
+ :width: 498px
:scale: 100%
:alt: Configure program screen shot
:align: center
multi-threaded support (the only option for DLL's).
To do a build for your requirements, simply go to the configure sub-
- directory under VisualMagick and open the configure.dsw workspace (for
- Visual C++ 6.0) or configure.sln (for Visual C++ 7.X or 8.X). Set the
- build configuration to "Release" under the
+ directory under VisualMagick and open the configure.dsw workspace
+ (for Visual C++ 6.0) or configure.sln (for Visual C++ 7.X through
+ 9.X). Set the build configuration to "Release" under the
"Build..., Set Active Configuration..." menu.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p>Sometime in the future, MagickCMD may assume the place of gm.exe in the
"utils" distribution in order to decrease the overall package size.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
};
}
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
<pre class="literal-block">
PathArcRel ( const PathArcArgsList &coordinates_ );
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</div>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
</tr>
</tbody>
</table>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
</table>
<p>Note that <em>ErrorMissingDelegate</em> is a "catch-all" error reported when
GraphicsMagick is unable to figure out how to open the file.</p>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
</tr>
</tbody>
</table>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
void writePixels ( const QuantumType quantum_,
unsigned char *destination_ )
</pre>
-<p>Copyright © <a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">Bob Friesenhahn</a> 1999 - 2019</p>
+<p>Copyright © <a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">Bob Friesenhahn</a> 1999 - 2020</p>
</div>
</div>
</div>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| `Bob Friesenhahn`_ 1999 - 2019
+Copyright |copy| `Bob Friesenhahn`_ 1999 - 2020
reference and data are deleted. This strategy represents a simple (but
effective) form of garbage collection.</p>
<img alt="Figure showing Image class design" src="Image.png" style="width: 910px; height: 490px;" />
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
totally opaque).</p>
<p>Note that for CMYKColorspace + matte (CMYKA), the opacity is stored in
the assocated IndexPacket.</p>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
<h1><a class="toc-backref" href="#id6">Reporting Bugs</a></h1>
<p>Please report any bugs via the <a class="reference external" href="http://sourceforge.net/projects/graphicsmagick/">GraphicsMagick Bug Tracker</a>. Questions
regarding usage should be directed to <a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">Bob Friesenhahn</a>.</p>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
$(WWWDIR)/ChangeLog-2016.html \
$(WWWDIR)/ChangeLog-2017.html \
$(WWWDIR)/ChangeLog-2018.html \
+ $(WWWDIR)/ChangeLog-2019.html \
$(WWWDIR)/Changelog.html \
$(WWWDIR)/Changes.html \
$(WWWDIR)/Copyright.html \
$(WWWDIR)/ChangeLog-2016.html \
$(WWWDIR)/ChangeLog-2017.html \
$(WWWDIR)/ChangeLog-2018.html \
+ $(WWWDIR)/ChangeLog-2019.html \
$(WWWDIR)/Changelog.html \
$(WWWDIR)/Changes.html \
$(WWWDIR)/Copyright.html \
$(top_srcdir)/www/Changelog.rst: $(top_srcdir)/ChangeLog
$(CHANGELOG2RST) < $^ > $@
+$(top_srcdir)/www/ChangeLog-2019.rst: $(top_srcdir)/ChangeLog.2019
+ $(CHANGELOG2RST) < $^ > $@
+
$(top_srcdir)/www/ChangeLog-2018.rst: $(top_srcdir)/ChangeLog.2018
$(CHANGELOG2RST) < $^ > $@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>GraphicsMagick News</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
<!-- -*- mode: rst -*- -->
<!-- This text is in reStucturedText format, so it may look a bit odd. -->
<!-- See http://docutils.sourceforge.net/rst.html for details. -->
-<p>This file was last updated to reflect changes up to December 24, 2019</p>
+<p>This file was last updated to reflect changes up to February 23, 2020</p>
<p>Please note that this file records news for the associated development
branch and that each development branch has its own NEWS file. See the
ChangeLog file, and/or the Mercurial changesets, for full details.</p>
release and not attempt to patch older releases.</p>
<div class="contents local topic" id="contents">
<ul class="simple">
-<li><a class="reference internal" href="#december-24-2019" id="id2">1.3.34 (December 24, 2019)</a></li>
-<li><a class="reference internal" href="#july-20-2019" id="id3">1.3.33 (July 20, 2019)</a></li>
-<li><a class="reference internal" href="#june-15-2019" id="id4">1.3.32 (June 15, 2019)</a></li>
-<li><a class="reference internal" href="#november-17-2018" id="id5">1.3.31 (November 17, 2018)</a></li>
-<li><a class="reference internal" href="#june-23-2018" id="id6">1.3.30 (June 23, 2018)</a></li>
-<li><a class="reference internal" href="#april-29-2018" id="id7">1.3.29 (April 29, 2018)</a></li>
-<li><a class="reference internal" href="#january-20-2018" id="id8">1.3.28 (January 20, 2018)</a></li>
-<li><a class="reference internal" href="#december-9-2017" id="id9">1.3.27 (December 9, 2017)</a></li>
-<li><a class="reference internal" href="#july-4-2017" id="id10">1.3.26 (July 4, 2017)</a></li>
-<li><a class="reference internal" href="#september-5-2016" id="id11">1.3.25 (September 5, 2016)</a></li>
-<li><a class="reference internal" href="#may-30-2016" id="id12">1.3.24 (May 30, 2016)</a></li>
-<li><a class="reference internal" href="#november-7-2015" id="id13">1.3.23 (November 7, 2015)</a></li>
-<li><a class="reference internal" href="#october-4-2015" id="id14">1.3.22 (October 4, 2015)</a></li>
-<li><a class="reference internal" href="#february-28-2015" id="id15">1.3.21 (February 28, 2015)</a></li>
-<li><a class="reference internal" href="#august-16-2014" id="id16">1.3.20 (August 16, 2014)</a></li>
-<li><a class="reference internal" href="#december-31-2013" id="id17">1.3.19 (December 31, 2013)</a></li>
-<li><a class="reference internal" href="#march-10-2013" id="id18">1.3.18 (March 10, 2013)</a></li>
-<li><a class="reference internal" href="#october-13-2012" id="id19">1.3.17 (October 13, 2012)</a></li>
-<li><a class="reference internal" href="#june-24-2012" id="id20">1.3.16 (June 24, 2012)</a></li>
-<li><a class="reference internal" href="#april-28-2012" id="id21">1.3.15 (April 28, 2012)</a></li>
-<li><a class="reference internal" href="#february-25-2012" id="id22">1.3.14 (February 25, 2012)</a></li>
-<li><a class="reference internal" href="#december-24-2011" id="id23">1.3.13 (December 24, 2011)</a></li>
-<li><a class="reference internal" href="#march-8-2010" id="id24">1.3.12 (March 8, 2010)</a></li>
-<li><a class="reference internal" href="#february-21-2010" id="id25">1.3.11 (February 21, 2010)</a></li>
-<li><a class="reference internal" href="#february-10-2010" id="id26">1.3.10 (February 10, 2010)</a></li>
-<li><a class="reference internal" href="#february-4-2010" id="id27">1.3.9 (February 4, 2010)</a></li>
-<li><a class="reference internal" href="#january-21-2010" id="id28">1.3.8 (January 21, 2010)</a></li>
-<li><a class="reference internal" href="#september-17-2009" id="id29">1.3.7 (September 17, 2009)</a></li>
-<li><a class="reference internal" href="#july-25-2009" id="id30">1.3.6 (July 25, 2009)</a></li>
-<li><a class="reference internal" href="#january-26-2009" id="id31">1.3.5 (January 26, 2009)</a></li>
-<li><a class="reference internal" href="#january-13-2009" id="id32">1.3.4 (January 13, 2009)</a></li>
-<li><a class="reference internal" href="#december-9-2008" id="id33">1.3.3 (December 9, 2008)</a></li>
-<li><a class="reference internal" href="#november-29-2008" id="id34">1.3.2 (November 29, 2008)</a></li>
-<li><a class="reference internal" href="#november-17-2008" id="id35">1.3.1 (November 17, 2008)</a></li>
-<li><a class="reference internal" href="#november-9-2008" id="id36">1.3 (November 9, 2008)</a></li>
-<li><a class="reference internal" href="#april-29-2008" id="id37">1.2 (April 29, 2008)</a></li>
-<li><a class="reference internal" href="#released-april-4-2004" id="id38">1.1 (Released April 4, 2004)</a></li>
-<li><a class="reference internal" href="#released-in-may-2003" id="id39">1.0 (Released in May, 2003)</a></li>
+<li><a class="reference internal" href="#february-23-2020" id="id2">1.3.35 (February 23, 2020)</a></li>
+<li><a class="reference internal" href="#december-24-2019" id="id3">1.3.34 (December 24, 2019)</a></li>
+<li><a class="reference internal" href="#july-20-2019" id="id4">1.3.33 (July 20, 2019)</a></li>
+<li><a class="reference internal" href="#june-15-2019" id="id5">1.3.32 (June 15, 2019)</a></li>
+<li><a class="reference internal" href="#november-17-2018" id="id6">1.3.31 (November 17, 2018)</a></li>
+<li><a class="reference internal" href="#june-23-2018" id="id7">1.3.30 (June 23, 2018)</a></li>
+<li><a class="reference internal" href="#april-29-2018" id="id8">1.3.29 (April 29, 2018)</a></li>
+<li><a class="reference internal" href="#january-20-2018" id="id9">1.3.28 (January 20, 2018)</a></li>
+<li><a class="reference internal" href="#december-9-2017" id="id10">1.3.27 (December 9, 2017)</a></li>
+<li><a class="reference internal" href="#july-4-2017" id="id11">1.3.26 (July 4, 2017)</a></li>
+<li><a class="reference internal" href="#september-5-2016" id="id12">1.3.25 (September 5, 2016)</a></li>
+<li><a class="reference internal" href="#may-30-2016" id="id13">1.3.24 (May 30, 2016)</a></li>
+<li><a class="reference internal" href="#november-7-2015" id="id14">1.3.23 (November 7, 2015)</a></li>
+<li><a class="reference internal" href="#october-4-2015" id="id15">1.3.22 (October 4, 2015)</a></li>
+<li><a class="reference internal" href="#february-28-2015" id="id16">1.3.21 (February 28, 2015)</a></li>
+<li><a class="reference internal" href="#august-16-2014" id="id17">1.3.20 (August 16, 2014)</a></li>
+<li><a class="reference internal" href="#december-31-2013" id="id18">1.3.19 (December 31, 2013)</a></li>
+<li><a class="reference internal" href="#march-10-2013" id="id19">1.3.18 (March 10, 2013)</a></li>
+<li><a class="reference internal" href="#october-13-2012" id="id20">1.3.17 (October 13, 2012)</a></li>
+<li><a class="reference internal" href="#june-24-2012" id="id21">1.3.16 (June 24, 2012)</a></li>
+<li><a class="reference internal" href="#april-28-2012" id="id22">1.3.15 (April 28, 2012)</a></li>
+<li><a class="reference internal" href="#february-25-2012" id="id23">1.3.14 (February 25, 2012)</a></li>
+<li><a class="reference internal" href="#december-24-2011" id="id24">1.3.13 (December 24, 2011)</a></li>
+<li><a class="reference internal" href="#march-8-2010" id="id25">1.3.12 (March 8, 2010)</a></li>
+<li><a class="reference internal" href="#february-21-2010" id="id26">1.3.11 (February 21, 2010)</a></li>
+<li><a class="reference internal" href="#february-10-2010" id="id27">1.3.10 (February 10, 2010)</a></li>
+<li><a class="reference internal" href="#february-4-2010" id="id28">1.3.9 (February 4, 2010)</a></li>
+<li><a class="reference internal" href="#january-21-2010" id="id29">1.3.8 (January 21, 2010)</a></li>
+<li><a class="reference internal" href="#september-17-2009" id="id30">1.3.7 (September 17, 2009)</a></li>
+<li><a class="reference internal" href="#july-25-2009" id="id31">1.3.6 (July 25, 2009)</a></li>
+<li><a class="reference internal" href="#january-26-2009" id="id32">1.3.5 (January 26, 2009)</a></li>
+<li><a class="reference internal" href="#january-13-2009" id="id33">1.3.4 (January 13, 2009)</a></li>
+<li><a class="reference internal" href="#december-9-2008" id="id34">1.3.3 (December 9, 2008)</a></li>
+<li><a class="reference internal" href="#november-29-2008" id="id35">1.3.2 (November 29, 2008)</a></li>
+<li><a class="reference internal" href="#november-17-2008" id="id36">1.3.1 (November 17, 2008)</a></li>
+<li><a class="reference internal" href="#november-9-2008" id="id37">1.3 (November 9, 2008)</a></li>
+<li><a class="reference internal" href="#april-29-2008" id="id38">1.2 (April 29, 2008)</a></li>
+<li><a class="reference internal" href="#released-april-4-2004" id="id39">1.1 (Released April 4, 2004)</a></li>
+<li><a class="reference internal" href="#released-in-may-2003" id="id40">1.0 (Released in May, 2003)</a></li>
+</ul>
+</div>
+<div class="section" id="february-23-2020">
+<h1><a class="toc-backref" href="#id2">1.3.35 (February 23, 2020)</a></h1>
+<p>Special Issues:</p>
+<ul class="simple">
+<li>It has been discovered that the 'ICU' library (a perhaps 30MB C++
+library) which is now often a libxml2 dependendency causes huge
+process initialization overhead. This is noticed as unexpected
+slowness when GraphicsMagick utilities are used to process small to
+medium sized files. The time to initialize the 'ICU' library is
+often longer than the time that GraphicsMagick would otherwise
+require to read the input file, process the image, and write the
+output file. If the 'ICU' dependency can not be avoided, then make
+sure to use the modules build so there is only impact for file
+formats which require libxml2. Please lobby the 'ICU' library
+developers to change their implementation to avoid long start-up
+times due to merely linking with the library.</li>
+</ul>
+<p>Security Fixes:</p>
+<ul class="simple">
+<li>GraphicsMagick is now participating in Google's oss-fuzz project due
+to the contributions and assistance of Alex Gaynor. Since February 4
+2018, 398 issues have been opened by oss-fuzz (some of which were
+benign build issues) and 11 issues remain 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
+they have been in "New" status for 90 days. There are too many
+fixes to list here. Please consult the GraphicsMagick ChangeLog
+file, Mercurial repository commit log, and the oss-fuzz issues list
+for details.</li>
+</ul>
+<p>Bug fixes:</p>
+<ul class="simple">
+<li>Fix broken definition of ResourceInfinity which resulted in that
+GetMagickResource() would return -1 rather than the maximum range
+value for the return type as documented. (problem added by the
+1.3.32 release).</li>
+<li>ModifyCache(): Re-open the pixel cache if the cache rows/columns do
+not match the owning image rows/columns.</li>
+<li>Fix DisplayImages() return status. The return status was inverted.</li>
+<li>HISTOGRAM: Histogram once again includes the histogram as a text
+comment. This became broken by previous security fixes.</li>
+<li>PICT: Fixed heap buffer overuns reported multiple sources.</li>
+<li>JNG: Detect when JPEG encoder has failed and throw an exception.</li>
+<li>MVG/DrawImage(): Performs even more parsing validations.</li>
+<li>Clang static analyzer fixes: A great many fixes were made based on
+problem reports by the Clang static analyzer.</li>
+<li>Visual Studio static analyzer fixes: A great many fixes were made
+based on problem reports by the Visual Studio 2019 static analyzer.
+Many of these may improve the robustness of 64-bit code.</li>
+</ul>
+<p>New Features:</p>
+<ul class="simple">
+<li>GRADIENT/GradientImage(): Improved accuracy of gradient levels as
+well as dramaticaly improving performance. Output PseudoClass
+images if we can. Add support for using the image 'gravity'
+attribute as well as the "gradient:direction" definition to produce
+gradient vector directions corresponding to SouthGravity (the
+previously-existing default), NorthGravity, WestGravity,
+EastGravity, NorthWestGravity, NorthEastGravity, SouthWestGravity,
+and SouthEastGravity.</li>
+</ul>
+<p>API Updates:</p>
+<ul class="simple">
+<li>InitializeMagickEx(): New function which may be used in place of
+InitializeMagick() to initialize GraphicsMagick. This
+initialization function returns an error status value, may update a
+passed ExceptionInfo structure with error information, and provides
+an options parameter which supports simple bit-flags to tailor
+initialization. The signal handler registrations are skipped if the
+MAGICK_OPT_NO_SIGNAL_HANDER flag is set in the options.</li>
+</ul>
+<p>Feature improvements:</p>
+<ul class="simple">
+<li>Replace use of non-reentrant legacy POSIX functions with reentrant
+equivalents.</li>
+<li>Timing of image reads should now be very accurate. The timer was
+sometimes not stopped as soon as it should be.</li>
+<li>PICT: The PICT reader is working pretty good now. It handles all
+the PICT image files I have available to me.</li>
+</ul>
+<p>Windows Delegate Updates/Additions:</p>
+<ul class="simple">
+<li>None</li>
+</ul>
+<p>Build Changes:</p>
+<ul class="simple">
+<li>Visual Studio Build: Configure program now provides a checkbox to
+enable common optimizations for better performance.</li>
+</ul>
+<p>Behavior Changes:</p>
+<ul class="simple">
+<li>POSIX Signals: Use the normal termination signal handler for SIGXCPU
+and SIGXFSZ so that ulimit or setrlimit(2) may be used to apply CPU
+(RLIMIT_CPU) and output file size (RLIMIT_FSIZE) limits with the
+normal cleanup, and without dumping core. Note that any output files
+currently being written may be truncated and files being written by
+external programs (e.g. Ghostscript) might be left behind unless
+they are to a temporary file assigned by GraphicsMagick.</li>
+<li>Some private string and integer constants were removed from the
+apparent library ABI. Some private functions were marked static and
+removed from the apparent library ABI. This is mentioned because
+someone is sure to notice and be concerned about it.</li>
+<li>The remaining private content in installed header files was moved
+into -private.h header files which are not installed. This should
+not be cause for concern but is mentiond because someone is sure to
+notice and be concerned about it.</li>
</ul>
</div>
<div class="section" id="december-24-2019">
-<h1><a class="toc-backref" href="#id2">1.3.34 (December 24, 2019)</a></h1>
+<h1><a class="toc-backref" href="#id3">1.3.34 (December 24, 2019)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>It has been discovered that the 'ICU' library (a perhaps 30MB C++
</ul>
</div>
<div class="section" id="july-20-2019">
-<h1><a class="toc-backref" href="#id3">1.3.33 (July 20, 2019)</a></h1>
+<h1><a class="toc-backref" href="#id4">1.3.33 (July 20, 2019)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>It has been discovered that the 'ICU' library (a perhaps 30MB C++
</ul>
</div>
<div class="section" id="june-15-2019">
-<h1><a class="toc-backref" href="#id4">1.3.32 (June 15, 2019)</a></h1>
+<h1><a class="toc-backref" href="#id5">1.3.32 (June 15, 2019)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>It has been discovered that the 'ICU' library (a perhaps 30MB C++
</ul>
</div>
<div class="section" id="november-17-2018">
-<h1><a class="toc-backref" href="#id5">1.3.31 (November 17, 2018)</a></h1>
+<h1><a class="toc-backref" href="#id6">1.3.31 (November 17, 2018)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>Firmware and operating system updates to address the Spectre
</ul>
</div>
<div class="section" id="june-23-2018">
-<h1><a class="toc-backref" href="#id6">1.3.30 (June 23, 2018)</a></h1>
+<h1><a class="toc-backref" href="#id7">1.3.30 (June 23, 2018)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>None</li>
</ul>
</div>
<div class="section" id="april-29-2018">
-<h1><a class="toc-backref" href="#id7">1.3.29 (April 29, 2018)</a></h1>
+<h1><a class="toc-backref" href="#id8">1.3.29 (April 29, 2018)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>None</li>
</ul>
</div>
<div class="section" id="january-20-2018">
-<h1><a class="toc-backref" href="#id8">1.3.28 (January 20, 2018)</a></h1>
+<h1><a class="toc-backref" href="#id9">1.3.28 (January 20, 2018)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>None</li>
</ul>
</div>
<div class="section" id="december-9-2017">
-<h1><a class="toc-backref" href="#id9">1.3.27 (December 9, 2017)</a></h1>
+<h1><a class="toc-backref" href="#id10">1.3.27 (December 9, 2017)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>None</li>
</ul>
</div>
<div class="section" id="july-4-2017">
-<h1><a class="toc-backref" href="#id10">1.3.26 (July 4, 2017)</a></h1>
+<h1><a class="toc-backref" href="#id11">1.3.26 (July 4, 2017)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>None</li>
</ul>
</div>
<div class="section" id="september-5-2016">
-<h1><a class="toc-backref" href="#id11">1.3.25 (September 5, 2016)</a></h1>
+<h1><a class="toc-backref" href="#id12">1.3.25 (September 5, 2016)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>None</li>
</ul>
</div>
<div class="section" id="may-30-2016">
-<h1><a class="toc-backref" href="#id12">1.3.24 (May 30, 2016)</a></h1>
+<h1><a class="toc-backref" href="#id13">1.3.24 (May 30, 2016)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>A shell exploit (CVE-2016-5118) was discovered associated with a
</ul>
</div>
<div class="section" id="november-7-2015">
-<h1><a class="toc-backref" href="#id13">1.3.23 (November 7, 2015)</a></h1>
+<h1><a class="toc-backref" href="#id14">1.3.23 (November 7, 2015)</a></h1>
<p>Special Issues:</p>
<ul class="simple">
<li>Due to <a class="reference external" href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53967">GCC bug 53967</a>, several key agorithms (e.g. convolution)
</ul>
</div>
<div class="section" id="october-4-2015">
-<h1><a class="toc-backref" href="#id14">1.3.22 (October 4, 2015)</a></h1>
+<h1><a class="toc-backref" href="#id15">1.3.22 (October 4, 2015)</a></h1>
<p>Thanks:</p>
<ul class="simple">
<li>Coverity: We thank Coverity for providing free service for free
entirely.</p>
</div>
<div class="section" id="february-28-2015">
-<h1><a class="toc-backref" href="#id15">1.3.21 (February 28, 2015)</a></h1>
+<h1><a class="toc-backref" href="#id16">1.3.21 (February 28, 2015)</a></h1>
<p>Thanks:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="august-16-2014">
-<h1><a class="toc-backref" href="#id16">1.3.20 (August 16, 2014)</a></h1>
+<h1><a class="toc-backref" href="#id17">1.3.20 (August 16, 2014)</a></h1>
<p>Special Issues:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="december-31-2013">
-<h1><a class="toc-backref" href="#id17">1.3.19 (December 31, 2013)</a></h1>
+<h1><a class="toc-backref" href="#id18">1.3.19 (December 31, 2013)</a></h1>
<p>Special Issues:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="march-10-2013">
-<h1><a class="toc-backref" href="#id18">1.3.18 (March 10, 2013)</a></h1>
+<h1><a class="toc-backref" href="#id19">1.3.18 (March 10, 2013)</a></h1>
<p>Special Issues:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="october-13-2012">
-<h1><a class="toc-backref" href="#id19">1.3.17 (October 13, 2012)</a></h1>
+<h1><a class="toc-backref" href="#id20">1.3.17 (October 13, 2012)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="june-24-2012">
-<h1><a class="toc-backref" href="#id20">1.3.16 (June 24, 2012)</a></h1>
+<h1><a class="toc-backref" href="#id21">1.3.16 (June 24, 2012)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
None</blockquote>
</div>
<div class="section" id="april-28-2012">
-<h1><a class="toc-backref" href="#id21">1.3.15 (April 28, 2012)</a></h1>
+<h1><a class="toc-backref" href="#id22">1.3.15 (April 28, 2012)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="february-25-2012">
-<h1><a class="toc-backref" href="#id22">1.3.14 (February 25, 2012)</a></h1>
+<h1><a class="toc-backref" href="#id23">1.3.14 (February 25, 2012)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="december-24-2011">
-<h1><a class="toc-backref" href="#id23">1.3.13 (December 24, 2011)</a></h1>
+<h1><a class="toc-backref" href="#id24">1.3.13 (December 24, 2011)</a></h1>
<p>Security Fixes:</p>
<blockquote>
None</blockquote>
</blockquote>
</div>
<div class="section" id="march-8-2010">
-<h1><a class="toc-backref" href="#id24">1.3.12 (March 8, 2010)</a></h1>
+<h1><a class="toc-backref" href="#id25">1.3.12 (March 8, 2010)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="february-21-2010">
-<h1><a class="toc-backref" href="#id25">1.3.11 (February 21, 2010)</a></h1>
+<h1><a class="toc-backref" href="#id26">1.3.11 (February 21, 2010)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="february-10-2010">
-<h1><a class="toc-backref" href="#id26">1.3.10 (February 10, 2010)</a></h1>
+<h1><a class="toc-backref" href="#id27">1.3.10 (February 10, 2010)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="february-4-2010">
-<h1><a class="toc-backref" href="#id27">1.3.9 (February 4, 2010)</a></h1>
+<h1><a class="toc-backref" href="#id28">1.3.9 (February 4, 2010)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="january-21-2010">
-<h1><a class="toc-backref" href="#id28">1.3.8 (January 21, 2010)</a></h1>
+<h1><a class="toc-backref" href="#id29">1.3.8 (January 21, 2010)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="september-17-2009">
-<h1><a class="toc-backref" href="#id29">1.3.7 (September 17, 2009)</a></h1>
+<h1><a class="toc-backref" href="#id30">1.3.7 (September 17, 2009)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="july-25-2009">
-<h1><a class="toc-backref" href="#id30">1.3.6 (July 25, 2009)</a></h1>
+<h1><a class="toc-backref" href="#id31">1.3.6 (July 25, 2009)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="january-26-2009">
-<h1><a class="toc-backref" href="#id31">1.3.5 (January 26, 2009)</a></h1>
+<h1><a class="toc-backref" href="#id32">1.3.5 (January 26, 2009)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="january-13-2009">
-<h1><a class="toc-backref" href="#id32">1.3.4 (January 13, 2009)</a></h1>
+<h1><a class="toc-backref" href="#id33">1.3.4 (January 13, 2009)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="december-9-2008">
-<h1><a class="toc-backref" href="#id33">1.3.3 (December 9, 2008)</a></h1>
+<h1><a class="toc-backref" href="#id34">1.3.3 (December 9, 2008)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="november-29-2008">
-<h1><a class="toc-backref" href="#id34">1.3.2 (November 29, 2008)</a></h1>
+<h1><a class="toc-backref" href="#id35">1.3.2 (November 29, 2008)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="november-17-2008">
-<h1><a class="toc-backref" href="#id35">1.3.1 (November 17, 2008)</a></h1>
+<h1><a class="toc-backref" href="#id36">1.3.1 (November 17, 2008)</a></h1>
<p>Security Fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="november-9-2008">
-<h1><a class="toc-backref" href="#id36">1.3 (November 9, 2008)</a></h1>
+<h1><a class="toc-backref" href="#id37">1.3 (November 9, 2008)</a></h1>
<p>Security fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="april-29-2008">
-<h1><a class="toc-backref" href="#id37">1.2 (April 29, 2008)</a></h1>
+<h1><a class="toc-backref" href="#id38">1.2 (April 29, 2008)</a></h1>
<p>Security fixes:</p>
<blockquote>
<ul class="simple">
</blockquote>
</div>
<div class="section" id="released-april-4-2004">
-<h1><a class="toc-backref" href="#id38">1.1 (Released April 4, 2004)</a></h1>
+<h1><a class="toc-backref" href="#id39">1.1 (Released April 4, 2004)</a></h1>
<p>Bug fixes:</p>
<blockquote>
<ul class="simple">
</div>
<hr class="docutils" />
<div class="section" id="released-in-may-2003">
-<h1><a class="toc-backref" href="#id39">1.0 (Released in May, 2003)</a></h1>
+<h1><a class="toc-backref" href="#id40">1.0 (Released in May, 2003)</a></h1>
<p>GraphicsMagick support services:</p>
<blockquote>
<ul class="simple">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>OpenMP in GraphicsMagick</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
specifying the maximum number of threads to use.</p>
<hr class="docutils" />
<div class="line-block">
-<div class="line">Copyright (C) 2008 - 2019 GraphicsMagick Group</div>
+<div class="line">Copyright (C) 2008 - 2020 GraphicsMagick Group</div>
</div>
<p>This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
--------------------------------------------------------------------------
-| Copyright (C) 2008 - 2019 GraphicsMagick Group
+| Copyright (C) 2008 - 2020 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
</li>
</ul>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
compile the GraphicsMagick utilities. Using compatible options ensures that
your program will compile and run.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>attribute</title>
<link rel="stylesheet" href="../docutils-api.css" type="text/css" />
</head>
<div class="section" id="id28">
<h2>Synopsis</h2>
<pre class="literal-block">
-unsigned int DisplayImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );
+MagickPassFail DisplayImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );
</pre>
</div>
<div class="section" id="id29">
<h2>Description</h2>
<p>DisplayImages() displays an image sequence to any X window screen. It
-returns a value other than 0 if successful. Check the exception member
-of image to determine the reason for any failure.</p>
+returns MagickPass if successful or MagickFail if not. Check the
+exception member of image to determine the reason for any failure.</p>
<p>The format of the DisplayImages method is:</p>
<pre class="literal-block">
-unsigned int DisplayImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );
+MagickPassFail DisplayImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );
</pre>
<p>A description of each parameter follows:</p>
<dl class="docutils">
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
-<li><a class="reference internal" href="#destroymagick" id="id29">DestroyMagick</a></li>
-<li><a class="reference internal" href="#destroymagickinfo" id="id30">DestroyMagickInfo</a></li>
-<li><a class="reference internal" href="#destroymagickinfolist" id="id31">DestroyMagickInfoList</a></li>
-<li><a class="reference internal" href="#getimagemagick" id="id32">GetImageMagick</a></li>
-<li><a class="reference internal" href="#getmagickinfo" id="id33">GetMagickInfo</a></li>
-<li><a class="reference internal" href="#getmagickinfoarray" id="id34">GetMagickInfoArray</a></li>
-<li><a class="reference internal" href="#initializemagick" id="id35">InitializeMagick</a></li>
-<li><a class="reference internal" href="#ismagickconflict" id="id36">IsMagickConflict</a></li>
-<li><a class="reference internal" href="#listmagickinfo" id="id37">ListMagickInfo</a></li>
-<li><a class="reference internal" href="#listmodulemap" id="id38">ListModuleMap</a></li>
-<li><a class="reference internal" href="#magicktomime" id="id39">MagickToMime</a></li>
-<li><a class="reference internal" href="#registermagickinfo" id="id40">RegisterMagickInfo</a></li>
-<li><a class="reference internal" href="#panicdestroymagick" id="id41">PanicDestroyMagick</a></li>
-<li><a class="reference internal" href="#setmagickinfo" id="id42">SetMagickInfo</a></li>
-<li><a class="reference internal" href="#unregistermagickinfo" id="id43">UnregisterMagickInfo</a></li>
+<li><a class="reference internal" href="#destroymagick" id="id31">DestroyMagick</a></li>
+<li><a class="reference internal" href="#destroymagickinfo" id="id32">DestroyMagickInfo</a></li>
+<li><a class="reference internal" href="#destroymagickinfolist" id="id33">DestroyMagickInfoList</a></li>
+<li><a class="reference internal" href="#getimagemagick" id="id34">GetImageMagick</a></li>
+<li><a class="reference internal" href="#getmagickinfo" id="id35">GetMagickInfo</a></li>
+<li><a class="reference internal" href="#getmagickinfoarray" id="id36">GetMagickInfoArray</a></li>
+<li><a class="reference internal" href="#initializemagick" id="id37">InitializeMagick</a></li>
+<li><a class="reference internal" href="#initializemagickex" id="id38">InitializeMagickEx</a></li>
+<li><a class="reference internal" href="#ismagickconflict" id="id39">IsMagickConflict</a></li>
+<li><a class="reference internal" href="#listmagickinfo" id="id40">ListMagickInfo</a></li>
+<li><a class="reference internal" href="#listmodulemap" id="id41">ListModuleMap</a></li>
+<li><a class="reference internal" href="#magicktomime" id="id42">MagickToMime</a></li>
+<li><a class="reference internal" href="#registermagickinfo" id="id43">RegisterMagickInfo</a></li>
+<li><a class="reference internal" href="#panicdestroymagick" id="id44">PanicDestroyMagick</a></li>
+<li><a class="reference internal" href="#setmagickinfo" id="id45">SetMagickInfo</a></li>
+<li><a class="reference internal" href="#unregistermagickinfo" id="id46">UnregisterMagickInfo</a></li>
</ul>
</div>
<div class="section" id="destroymagick">
-<h1><a class="toc-backref" href="#id29">DestroyMagick</a></h1>
+<h1><a class="toc-backref" href="#id31">DestroyMagick</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
</div>
<div class="section" id="destroymagickinfo">
-<h1><a class="toc-backref" href="#id30">DestroyMagickInfo</a></h1>
+<h1><a class="toc-backref" href="#id32">DestroyMagickInfo</a></h1>
<div class="section" id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
</div>
<div class="section" id="destroymagickinfolist">
-<h1><a class="toc-backref" href="#id31">DestroyMagickInfoList</a></h1>
+<h1><a class="toc-backref" href="#id33">DestroyMagickInfoList</a></h1>
<div class="section" id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
</div>
<div class="section" id="getimagemagick">
-<h1><a class="toc-backref" href="#id32">GetImageMagick</a></h1>
+<h1><a class="toc-backref" href="#id34">GetImageMagick</a></h1>
<div class="section" id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
</div>
<div class="section" id="getmagickinfo">
-<h1><a class="toc-backref" href="#id33">GetMagickInfo</a></h1>
+<h1><a class="toc-backref" href="#id35">GetMagickInfo</a></h1>
<div class="section" id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
</div>
<div class="section" id="getmagickinfoarray">
-<h1><a class="toc-backref" href="#id34">GetMagickInfoArray</a></h1>
+<h1><a class="toc-backref" href="#id36">GetMagickInfoArray</a></h1>
<div class="section" id="id9">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
</div>
<div class="section" id="initializemagick">
-<h1><a class="toc-backref" href="#id35">InitializeMagick</a></h1>
+<h1><a class="toc-backref" href="#id37">InitializeMagick</a></h1>
<div class="section" id="id11">
<h2>Synopsis</h2>
<pre class="literal-block">
</div>
<div class="section" id="id12">
<h2>Description</h2>
-<p>InitializeMagick() initializes the GraphicsMagick environment.
-InitializeMagick() MUST be invoked by the using program before making
-use of GraphicsMagick functions or else the library will be unusable.</p>
+<p>InitializeMagick() initializes the GraphicsMagick environment.</p>
+<p>InitializeMagick() or InitializeMagickEx() MUST be invoked by the using
+program before making use of GraphicsMagick functions or else the library
+will be unusable and any usage is likely to cause a crash.</p>
<p>This function should be invoked in the primary (original) thread of the
application's process, and before starting any OpenMP threads, as part
of program initialization.</p>
+<p>If alternate memory allocations are provided via MagickAllocFunctions()
+then that function should be invoked before InitializeMagickEx() since
+the memory allocation functions need to be consistent.</p>
<p>The format of the InitializeMagick function is:</p>
<pre class="literal-block">
InitializeMagick( const char *path );
<p>A description of each parameter follows:</p>
<dl class="docutils">
<dt>path:</dt>
-<dd>The execution path of the current GraphicsMagick client.</dd>
+<dd>The execution path of the current GraphicsMagick client (or NULL)</dd>
</dl>
</div>
</div>
-<div class="section" id="ismagickconflict">
-<h1><a class="toc-backref" href="#id36">IsMagickConflict</a></h1>
+<div class="section" id="initializemagickex">
+<h1><a class="toc-backref" href="#id38">InitializeMagickEx</a></h1>
<div class="section" id="id13">
<h2>Synopsis</h2>
<pre class="literal-block">
-MagickBool IsMagickConflict( const char *magick );
+MagickPassFail InitializeMagickEx( const char *path, unsigned int options,
+ <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );
</pre>
</div>
<div class="section" id="id14">
<h2>Description</h2>
+<p>InitializeMagickEx() initializes the GraphicsMagick environment,
+providing a bit more more control and visibility over initialization
+than the original InitializeMagick().</p>
+<p>InitializeMagick() or InitializeMagickEx() MUST be invoked by the using
+program before making use of GraphicsMagick functions or else the library
+will be unusable and any usage is likely to cause a crash.</p>
+<p>This function should be invoked in the primary (original) thread of the
+application's process, and before starting any OpenMP threads, as part
+of program initialization.</p>
+<p>If alternate memory allocations are provided via MagickAllocFunctions()
+then that function should be invoked before InitializeMagickEx() since
+the memory allocation functions need to be consistent.</p>
+<p>The format of the InitializeMagickEx function is:</p>
+<pre class="literal-block">
+MagickPassFail InitializeMagickEx( const char *path, unsigned int options,
+ <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );
+</pre>
+<dl class="docutils">
+<dt>path:</dt>
+<dd>The execution path of the current GraphicsMagick client (or NULL)</dd>
+<dt>options:</dt>
+<dd>Options flags tailoring initializations performed</dd>
+<dt>exception:</dt>
+<dd>Information about initialization failure is reported here.</dd>
+</dl>
+</div>
+</div>
+<div class="section" id="ismagickconflict">
+<h1><a class="toc-backref" href="#id39">IsMagickConflict</a></h1>
+<div class="section" id="id15">
+<h2>Synopsis</h2>
+<pre class="literal-block">
+MagickBool IsMagickConflict( const char *magick );
+</pre>
+</div>
+<div class="section" id="id16">
+<h2>Description</h2>
<p>Method IsMagickConflict returns true if the image format conflicts with
a logical drive (.e.g. X:).</p>
<p>The format of the IsMagickConflict method is:</p>
</div>
</div>
<div class="section" id="listmagickinfo">
-<h1><a class="toc-backref" href="#id37">ListMagickInfo</a></h1>
-<div class="section" id="id15">
+<h1><a class="toc-backref" href="#id40">ListMagickInfo</a></h1>
+<div class="section" id="id17">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail ListMagickInfo( FILE *file, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );
</pre>
</div>
-<div class="section" id="id16">
+<div class="section" id="id18">
<h2>Description</h2>
<p>ListMagickInfo() lists the image formats to a file.</p>
<p>The format of the ListMagickInfo method is:</p>
</div>
</div>
<div class="section" id="listmodulemap">
-<h1><a class="toc-backref" href="#id38">ListModuleMap</a></h1>
-<div class="section" id="id17">
+<h1><a class="toc-backref" href="#id41">ListModuleMap</a></h1>
+<div class="section" id="id19">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail ListModuleMap( FILE *file, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );
</pre>
</div>
-<div class="section" id="id18">
+<div class="section" id="id20">
<h2>Description</h2>
<p>Method ListModuleMap lists the module alias info to a file in the XML
format used by modules.mgk. True is returned on success.</p>
</div>
</div>
<div class="section" id="magicktomime">
-<h1><a class="toc-backref" href="#id39">MagickToMime</a></h1>
-<div class="section" id="id19">
+<h1><a class="toc-backref" href="#id42">MagickToMime</a></h1>
+<div class="section" id="id21">
<h2>Synopsis</h2>
<pre class="literal-block">
char *MagickToMime( const char *magick );
</pre>
</div>
-<div class="section" id="id20">
+<div class="section" id="id22">
<h2>Description</h2>
<p>Method MagickToMime returns the officially registered (or de facto) MIME
media-type corresponding to a magick string. If there is no registered
</div>
</div>
<div class="section" id="registermagickinfo">
-<h1><a class="toc-backref" href="#id40">RegisterMagickInfo</a></h1>
-<div class="section" id="id21">
+<h1><a class="toc-backref" href="#id43">RegisterMagickInfo</a></h1>
+<div class="section" id="id23">
<h2>Synopsis</h2>
<pre class="literal-block">
<a class="reference external" href="../api/types.html#magickinfo">MagickInfo</a> *RegisterMagickInfo( <a class="reference external" href="../api/types.html#magickinfo">MagickInfo</a> *magick_info );
</pre>
</div>
-<div class="section" id="id22">
+<div class="section" id="id24">
<h2>Description</h2>
<p>RegisterMagickInfo() adds attributes for a particular image format to the
list of supported formats. The attributes include the image format name,
</div>
</div>
<div class="section" id="panicdestroymagick">
-<h1><a class="toc-backref" href="#id41">PanicDestroyMagick</a></h1>
-<div class="section" id="id23">
+<h1><a class="toc-backref" href="#id44">PanicDestroyMagick</a></h1>
+<div class="section" id="id25">
<h2>Synopsis</h2>
<pre class="literal-block">
void PanicDestroyMagick( void );
</pre>
</div>
-<div class="section" id="id24">
+<div class="section" id="id26">
<h2>Description</h2>
<p>PanicDestroyMagick() destroys only persistent allocations such as
temporary files. Other allocations (e.g. semaphores and heap memory)
</div>
</div>
<div class="section" id="setmagickinfo">
-<h1><a class="toc-backref" href="#id42">SetMagickInfo</a></h1>
-<div class="section" id="id25">
+<h1><a class="toc-backref" href="#id45">SetMagickInfo</a></h1>
+<div class="section" id="id27">
<h2>Synopsis</h2>
<pre class="literal-block">
<a class="reference external" href="../api/types.html#magickinfo">MagickInfo</a> *SetMagickInfo( const char *name );
</pre>
</div>
-<div class="section" id="id26">
+<div class="section" id="id28">
<h2>Description</h2>
<p>Method SetMagickInfo allocates a MagickInfo structure and initializes the
members to default values.</p>
</div>
</div>
<div class="section" id="unregistermagickinfo">
-<h1><a class="toc-backref" href="#id43">UnregisterMagickInfo</a></h1>
-<div class="section" id="id27">
+<h1><a class="toc-backref" href="#id46">UnregisterMagickInfo</a></h1>
+<div class="section" id="id29">
<h2>Synopsis</h2>
<pre class="literal-block">
unsigned int UnregisterMagickInfo( const char *name );
</pre>
</div>
-<div class="section" id="id28">
+<div class="section" id="id30">
<h2>Description</h2>
<p>Method UnregisterMagickInfo removes a name from the magick info list. It
returns MagickFail if the name does not exist in the list otherwise
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>pixel_cache</title>
<link rel="stylesheet" href="../docutils-api.css" type="text/css" />
</head>
<div class="section" id="id21">
<h2>Synopsis</h2>
<pre class="literal-block">
-void TransformImage( <a class="reference external" href="../api/types.html#image">Image</a> ** image, const char *crop_geometry,
- const char *image_geometry );
+MagickPassFail TransformImage( <a class="reference external" href="../api/types.html#image">Image</a> ** image, const char *crop_geometry,
+ const char *image_geometry );
</pre>
</div>
<div class="section" id="id22">
is returned.</p>
<p>The format of the TransformImage method is:</p>
<pre class="literal-block">
-void TransformImage( <a class="reference external" href="../api/types.html#image">Image</a> ** image, const char *crop_geometry,
- const char *image_geometry );
+MagickPassFail TransformImage( <a class="reference external" href="../api/types.html#image">Image</a> ** image, const char *crop_geometry,
+ const char *image_geometry );
</pre>
<dl class="docutils">
<dt>image:</dt>
} XResourceInfo;
</pre>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
</dl>
<hr class="docutils" />
<div class="line-block">
-<div class="line">Copyright © GraphicsMagick Group 2002 - 2019</div>
+<div class="line">Copyright © GraphicsMagick Group 2002 - 2020</div>
</div>
<p>This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-| Copyright |copy| GraphicsMagick Group 2002 - 2019
+| Copyright |copy| GraphicsMagick Group 2002 - 2020
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
</pre>
<hr class="docutils" />
<div class="line-block">
-<div class="line">Copyright (C) 2008 - 2019 GraphicsMagick Group</div>
+<div class="line">Copyright (C) 2008 - 2020 GraphicsMagick Group</div>
</div>
<p>This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
--------------------------------------------------------------------------
-| Copyright (C) 2008 - 2019 GraphicsMagick Group
+| Copyright (C) 2008 - 2020 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
delegate under Windows.</li>
</ul>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p><a class="reference external" href="http://ftp.icm.edu.pl/pub/unix/graphics/GraphicsMagick/">Polish ftp mirror via http</a> (http protocol)</p>
</blockquote>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
for block compression. For example, a PNM image called image.pnm.gz is
automatically uncompressed while the image is read.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
crossed. The swap-samples option may be supplied when reading or writing
in order to read or write using the necessary sample order.
</dd>
+<dt>gradient:direction={South|North|West|East|NorthWest|NorthEast|SouthWest|SouthEast}</dt>
+<dd>By default, the gradient coder produces a gradient from top to
+bottom ("South"). Since GraphicsMagick 1.3.35, the gradient direction
+may be specified to produce gradient vectors according to a
+gravity-like specification. The arguments are <strong>South</strong> (Top to
+Bottom), <strong>North</strong> (Bottom to Top), <strong>West</strong> (Right to Left),
+<strong>East</strong> (Left to Right), <strong>NorthWest</strong> (Bottom-Right to
+Top-Left), <strong>NorthEast</strong> (Bottom-Left to Top-Right),
+<strong>SouthWest</strong> (Top-Right Bottom-Left), and <strong>SouthEast</strong>
+(Top-Left to Bottom-Right).
+</dd>
<dt>jp2:rate=<value></dt>
<dd>Specify the compression factor to use while writing JPEG-2000
files. The compression factor is the reciprocal of the compression
<p>To display the version information:
<pre>
GraphicsMagick 1.3.27a 2017-12-11 Q16 http://www.GraphicsMagick.org/
- Copyright (C) 2002-2017 GraphicsMagick Group.
+ Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>GraphicsMagick Image Processing System</title>
<meta content="GraphicsMagick is a robust collection of tools and libraries to read, write, and manipulate an image in any of the more popular image formats including GIF, JPEG, PNG, PDF, and WebP. With GraphicsMagick you can create GIFs dynamically making it suitable for Web applications. You can also resize, rotate, sharpen, color reduce, or add special effects to an image and save your completed work in the same or differing image format. " name="description" />
<meta content="GraphicsMagick, GM, PerlMagick, Perl Magick, Perl Magic, image processing, software development, TclMagick, Magick++" name="keywords" />
</colgroup>
<tbody valign="top">
<tr><td>Current Release</td>
-<td>1.3.34 (Released December 24, 2019) <a class="reference external" href="http://sourceforge.net/projects/graphicsmagick/files/">download release</a></td>
+<td>1.3.35 (Released February 23, 2020) <a class="reference external" href="http://sourceforge.net/projects/graphicsmagick/files/">download release</a></td>
</tr>
<tr><td>Development Snapshots</td>
<td>(Updated frequently) <a class="reference external" href="ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/snapshots/">download development snapshots</a></td>
</ul>
</blockquote>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
.. _programming : programming.html
=========================== ========================================================
-Current Release 1.3.34 (Released December 24, 2019) `download release`__
+Current Release 1.3.35 (Released February 23, 2020) `download release`__
Development Snapshots (Updated frequently) `download development snapshots`__
Mercurial Repository (Updated frequently) `visit Mercurial repository`__
=========================== ========================================================
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>Related Links</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
<h1><a class="toc-backref" href="#id21">Stock Photos</a></h1>
<p><a class="reference external" href="http://www.morguefile.com/">MorgueFile</a>, Free high-resolution stock photo images.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p>John Cristy, <a class="reference external" href="mailto:magick-users%40imagemagick.org">magick-users<span>@</span>imagemagick<span>.</span>org</a> ImageMagick Studio LLC.</p>
<p>Maintained since 2002 by Bob Friesenhahn, GraphicsMagick Group.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<li>Value, and respect the contributions of developers, and observe and
respect the copyrights of other projects.</li>
</ul>
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
</pre>
<p>to list all DPX header attributes.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</div>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
die "unable to continue" if ($1 == ResourceLimitError);
</pre>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p>Exit Criteria: None</p>
</blockquote>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</div>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p><em>Some of these languages and scripting environments are supported by the
GraphicsMagick Group while others are developed and supported by third parties.</em></p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p><a class="reference external" href="thanks.html">Thanks</a> - Read about those who helped in ways other than contributing code.</p>
<p><a class="reference external" href="Hg.html">Source Control</a> - Source control is important. We use Mercurial.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2012 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2012 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2012 - 2019
+Copyright |copy| GraphicsMagick Group 2012 - 2020
of using space subdivision for the color reduction algorithm. With Paul's
permission, this document is an adaptation from a document he wrote.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p><a class="reference external" href="miff.html">MIFF</a> - Magick Image File Format.</p>
<p><a class="reference external" href="links.html">Links</a> - Some links we find useful.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2012 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2012 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2012 - 2019
+Copyright |copy| GraphicsMagick Group 2012 - 2020
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.13.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>GraphicsMagick Security</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
=UAq2
-----END PGP PUBLIC KEY BLOCK-----
</pre>
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
</dl>
<hr class="docutils" />
<div class="line-block">
-<div class="line">Copyright © GraphicsMagick Group 2002 - 2019</div>
+<div class="line">Copyright © GraphicsMagick Group 2002 - 2020</div>
</div>
<p>This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-| Copyright |copy| GraphicsMagick Group 2002 - 2019
+| Copyright |copy| GraphicsMagick Group 2002 - 2020
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
<p><a class="reference external" href="montage.html">Montage</a> creates a composite by combining several separate images. The
images are tiled on a composite image with the name of the image and its
properties optionally appearing just below the individual tile.</p>
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
</tbody>
</table>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
<p>To display the version information:
<pre>
GraphicsMagick 1.3.27a 2017-12-11 Q16 http://www.GraphicsMagick.org/
- Copyright (C) 2002-2017 GraphicsMagick Group.
+ Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
compile the GraphicsMagick wand library. Using compatible options ensures that
your program will compile and run.</p>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2009 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2009 - 2020</p>
</div>
</body>
</html>
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2009 - 2019
+Copyright |copy| GraphicsMagick Group 2009 - 2020