summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2020-12-02 13:27:00 +0900
committerhj kim <backto.kim@samsung.com>2020-12-02 13:27:37 +0900
commit332002e6f4d7ce48ea4eeb55b59d84c64ad79f0b (patch)
treec52e09b3325e6f6c777fd247a9b97f52bab5e8f3
parentf5839121f0b6145e732bdb0b3e8196e48fbe3745 (diff)
downloadGraphicsMagick-332002e6f4d7ce48ea4eeb55b59d84c64ad79f0b.tar.gz
GraphicsMagick-332002e6f4d7ce48ea4eeb55b59d84c64ad79f0b.tar.bz2
GraphicsMagick-332002e6f4d7ce48ea4eeb55b59d84c64ad79f0b.zip
Imported Upstream version 1.3.35upstream/1.3.35
Change-Id: I4f31a0b17e1ca89907f274d952d43e60ffa4c769
-rw-r--r--ChangeLog1424
-rw-r--r--ChangeLog.20191377
-rw-r--r--Copyright.txt2
-rw-r--r--Magick++/lib/Options.cpp7
-rw-r--r--Makefile.am1
-rw-r--r--Makefile.in27
-rw-r--r--NEWS.txt124
-rw-r--r--PerlMagick/Magick.pm2
-rw-r--r--PerlMagick/t/composite.t42
-rw-r--r--PerlMagick/t/read.t5
-rw-r--r--PerlMagick/t/reference/composite/Add.miffbin24093 -> 13529 bytes
-rw-r--r--PerlMagick/t/reference/composite/Atop.miffbin24093 -> 13561 bytes
-rw-r--r--PerlMagick/t/reference/composite/Bumpmap.miffbin24093 -> 10981 bytes
-rw-r--r--PerlMagick/t/reference/composite/Clear.miffbin24093 -> 765 bytes
-rw-r--r--PerlMagick/t/reference/composite/Copy.miffbin24093 -> 13529 bytes
-rw-r--r--PerlMagick/t/reference/composite/CopyBlue.miffbin24093 -> 12533 bytes
-rw-r--r--PerlMagick/t/reference/composite/CopyGreen.miffbin24093 -> 12337 bytes
-rw-r--r--PerlMagick/t/reference/composite/CopyOpacity.miffbin32092 -> 17254 bytes
-rw-r--r--PerlMagick/t/reference/composite/CopyRed.miffbin24093 -> 12641 bytes
-rw-r--r--PerlMagick/t/reference/composite/Difference.miffbin24109 -> 13569 bytes
-rw-r--r--PerlMagick/t/reference/composite/Dissolve.miffbin24093 -> 11609 bytes
-rw-r--r--PerlMagick/t/reference/composite/Divide.miffbin24093 -> 11981 bytes
-rw-r--r--PerlMagick/t/reference/composite/In.miffbin24093 -> 13529 bytes
-rw-r--r--PerlMagick/t/reference/composite/Minus.miffbin24093 -> 13445 bytes
-rw-r--r--PerlMagick/t/reference/composite/Multiply.miffbin24109 -> 13233 bytes
-rw-r--r--PerlMagick/t/reference/composite/Out.miffbin24093 -> 869 bytes
-rw-r--r--PerlMagick/t/reference/composite/Over.miffbin24093 -> 13561 bytes
-rw-r--r--PerlMagick/t/reference/composite/Plus.miffbin24093 -> 12681 bytes
-rw-r--r--PerlMagick/t/reference/composite/Subtract.miffbin24093 -> 13529 bytes
-rw-r--r--PerlMagick/t/reference/composite/Xor.miffbin24093 -> 765 bytes
-rw-r--r--PerlMagick/t/reference/read/gradient.miffbin9752 -> 1931 bytes
-rw-r--r--PerlMagick/t/reference/wmf/clock.miffbin51810 -> 51814 bytes
-rw-r--r--PerlMagick/t/reference/wmf/fulltest.miffbin0 -> 143854 bytes
-rw-r--r--PerlMagick/t/reference/wmf/ski.miffbin22914 -> 22910 bytes
-rw-r--r--PerlMagick/t/subroutines.pl44
-rw-r--r--PerlMagick/t/wmf/read.t2
-rw-r--r--README.txt2
-rw-r--r--coders/art.c7
-rw-r--r--coders/avs.c6
-rw-r--r--coders/bmp.c3
-rw-r--r--coders/braille.c2
-rw-r--r--coders/cals.c85
-rw-r--r--coders/caption.c4
-rw-r--r--coders/cineon.c14
-rw-r--r--coders/clipboard.c3
-rw-r--r--coders/cmyk.c19
-rw-r--r--coders/cut.c3
-rw-r--r--coders/dcm.c13
-rw-r--r--coders/dib.c49
-rw-r--r--coders/dps.c3
-rw-r--r--coders/dpx.c15
-rw-r--r--coders/emf.c3
-rw-r--r--coders/fax.c2
-rw-r--r--coders/fits.c16
-rw-r--r--coders/fpx.c3
-rw-r--r--coders/gif.c17
-rw-r--r--coders/gradient.c43
-rw-r--r--coders/gray.c7
-rw-r--r--coders/histogram.c157
-rw-r--r--coders/hrz.c5
-rw-r--r--coders/icon.c3
-rw-r--r--coders/identity.c6
-rw-r--r--coders/jbig.c71
-rw-r--r--coders/jnx.c2
-rw-r--r--coders/jp2.c5
-rw-r--r--coders/jpeg.c100
-rw-r--r--coders/label.c1
-rw-r--r--coders/locale.c2
-rw-r--r--coders/logo.c46
-rw-r--r--coders/mac.c138
-rw-r--r--coders/map.c12
-rw-r--r--coders/mat.c17
-rw-r--r--coders/meta.c14
-rw-r--r--coders/miff.c3
-rw-r--r--coders/mono.c4
-rw-r--r--coders/mpc.c13
-rw-r--r--coders/mpeg.c11
-rw-r--r--coders/mtv.c5
-rw-r--r--coders/mvg.c3
-rw-r--r--coders/null.c7
-rw-r--r--coders/otb.c4
-rw-r--r--coders/palm.c2
-rw-r--r--coders/pcd.c13
-rw-r--r--coders/pcl.c4
-rw-r--r--coders/pcx.c28
-rw-r--r--coders/pdb.c16
-rw-r--r--coders/pdf.c22
-rw-r--r--coders/pict.c258
-rw-r--r--coders/pix.c3
-rw-r--r--coders/plasma.c5
-rw-r--r--coders/png.c42
-rw-r--r--coders/pnm.c7
-rw-r--r--coders/preview.c10
-rw-r--r--coders/ps.c26
-rw-r--r--coders/ps2.c30
-rw-r--r--coders/ps3.c16
-rw-r--r--coders/pwp.c3
-rw-r--r--coders/rgb.c17
-rw-r--r--coders/rla.c1
-rw-r--r--coders/rle.c12
-rw-r--r--coders/sct.c4
-rw-r--r--coders/sfw.c8
-rw-r--r--coders/sgi.c19
-rw-r--r--coders/stegano.c4
-rw-r--r--coders/sun.c3
-rw-r--r--coders/svg.c6
-rw-r--r--coders/tga.c7
-rw-r--r--coders/tiff.c265
-rw-r--r--coders/tile.c12
-rw-r--r--coders/tim.c15
-rw-r--r--coders/topol.c4
-rw-r--r--coders/ttf.c3
-rw-r--r--coders/txt.c18
-rw-r--r--coders/uyvy.c4
-rw-r--r--coders/vicar.c4
-rw-r--r--coders/vid.c11
-rw-r--r--coders/viff.c17
-rw-r--r--coders/wbmp.c4
-rw-r--r--coders/webp.c6
-rw-r--r--coders/wmf.c6
-rw-r--r--coders/wpg.c29
-rw-r--r--coders/xbm.c6
-rw-r--r--coders/xc.c8
-rw-r--r--coders/xcf.c13
-rw-r--r--coders/xpm.c22
-rw-r--r--coders/xwd.c3
-rw-r--r--coders/yuv.c9
-rwxr-xr-xconfigure116
-rwxr-xr-xconfigure.ac7
-rw-r--r--locale/C.mgk2
-rw-r--r--magick/Makefile.am21
-rw-r--r--magick/analyze.h7
-rw-r--r--magick/annotate.c86
-rw-r--r--magick/attribute-private.h30
-rw-r--r--magick/attribute.c8
-rw-r--r--magick/attribute.h14
-rw-r--r--magick/blob.c5
-rw-r--r--magick/color-private.h60
-rw-r--r--magick/color.c4
-rw-r--r--magick/color.h47
-rw-r--r--magick/color_lookup-private.h59
-rw-r--r--magick/color_lookup.h45
-rw-r--r--magick/colormap-private.h47
-rw-r--r--magick/colormap.h30
-rw-r--r--magick/command-private.h24
-rw-r--r--magick/command.c15
-rw-r--r--magick/command.h10
-rw-r--r--magick/common.h18
-rw-r--r--magick/composite.c2
-rw-r--r--magick/compress.c8
-rw-r--r--magick/constitute-private.h24
-rw-r--r--magick/constitute.c5
-rw-r--r--magick/constitute.h10
-rw-r--r--magick/delegate-private.h132
-rw-r--r--magick/describe.c4
-rw-r--r--magick/draw.c6
-rw-r--r--magick/effect.c53
-rw-r--r--magick/enhance.c2
-rw-r--r--magick/enum_strings.c44
-rw-r--r--magick/enum_strings.h1
-rw-r--r--magick/error-private.h218
-rw-r--r--magick/error.h199
-rw-r--r--magick/fx.c2
-rw-r--r--magick/gem.c18
-rw-r--r--magick/gradient.c277
-rw-r--r--magick/image-private.h10
-rw-r--r--magick/image.c28
-rw-r--r--magick/list.c2
-rw-r--r--magick/locale_c.h978
-rw-r--r--magick/log-private.h27
-rw-r--r--magick/log.c11
-rw-r--r--magick/log.h13
-rw-r--r--magick/magic-private.h24
-rw-r--r--magick/magic.c2
-rw-r--r--magick/magic.h10
-rw-r--r--magick/magick-private.h31
-rw-r--r--magick/magick.c106
-rw-r--r--magick/magick.h23
-rw-r--r--magick/magick_config.h.in3
-rw-r--r--magick/magick_types.h14
-rw-r--r--magick/magick_types.h.in14
-rw-r--r--magick/memory-private.h89
-rw-r--r--magick/memory.h77
-rw-r--r--magick/module-private.h58
-rw-r--r--magick/module.c10
-rw-r--r--magick/module.h44
-rw-r--r--magick/monitor-private.h28
-rw-r--r--magick/monitor.h15
-rw-r--r--magick/montage.c4
-rw-r--r--magick/nt_base.c2
-rw-r--r--magick/nt_base.h2
-rw-r--r--magick/nt_feature.c2
-rw-r--r--magick/operator.c1
-rw-r--r--magick/paint.c32
-rw-r--r--magick/pixel_cache.c22
-rw-r--r--magick/quantize.c272
-rw-r--r--magick/random-private.h97
-rw-r--r--magick/random.c1
-rw-r--r--magick/random.h23
-rw-r--r--magick/registry-private.h22
-rw-r--r--magick/registry.h8
-rw-r--r--magick/render-private.h60
-rw-r--r--magick/render.c295
-rw-r--r--magick/render.h50
-rw-r--r--magick/resize.c20
-rw-r--r--magick/resource.c2
-rw-r--r--magick/segment.c18
-rw-r--r--magick/shear.c32
-rw-r--r--magick/signature.c6
-rw-r--r--magick/studio.h31
-rw-r--r--magick/symbols.h16
-rw-r--r--magick/tempfile-private.h53
-rw-r--r--magick/tempfile.h41
-rw-r--r--magick/timer.c10
-rw-r--r--magick/timer.h4
-rw-r--r--magick/transform.c28
-rw-r--r--magick/transform.h2
-rw-r--r--magick/type-private.h24
-rw-r--r--magick/type.h10
-rw-r--r--magick/utility-private.h59
-rw-r--r--magick/utility.c56
-rw-r--r--magick/utility.h44
-rw-r--r--magick/version.h16
-rw-r--r--magick/version.h.in4
-rw-r--r--magick/xwindow.c3
-rw-r--r--scripts/html_fragments.py2
-rw-r--r--tests/bitstream.c2
-rw-r--r--tests/rwblob.c11
-rw-r--r--tests/rwfile.c11
-rw-r--r--utilities/gm.120
-rwxr-xr-xversion.sh15
-rw-r--r--wand/drawing_wand.c10
-rw-r--r--www/ChangeLog-2009.html6
-rw-r--r--www/ChangeLog-2010.html31
-rw-r--r--www/ChangeLog-2019.html1506
-rw-r--r--www/ChangeLog-2019.rst1377
-rw-r--r--www/Changelog.html1546
-rw-r--r--www/Changelog.rst1424
-rw-r--r--www/Changes.html7
-rw-r--r--www/Changes.rst7
-rw-r--r--www/Copyright.html2
-rw-r--r--www/FAQ.html2
-rw-r--r--www/FAQ.rst2
-rw-r--r--www/GraphicsMagick.html15
-rw-r--r--www/Hg.html2
-rw-r--r--www/Hg.rst2
-rw-r--r--www/INSTALL-unix.html35
-rw-r--r--www/INSTALL-unix.rst35
-rw-r--r--www/INSTALL-windows.html61
-rw-r--r--www/INSTALL-windows.rst61
-rw-r--r--www/ImageMagickObject.html2
-rw-r--r--www/ImageMagickObject.rst2
-rw-r--r--www/Magick++/Blob.html2
-rw-r--r--www/Magick++/Blob.rst2
-rw-r--r--www/Magick++/CoderInfo.html2
-rw-r--r--www/Magick++/CoderInfo.rst2
-rw-r--r--www/Magick++/Color.html2
-rw-r--r--www/Magick++/Color.rst2
-rw-r--r--www/Magick++/Drawable.html2
-rw-r--r--www/Magick++/Drawable.rst2
-rw-r--r--www/Magick++/Enumerations.html2
-rw-r--r--www/Magick++/Enumerations.rst2
-rw-r--r--www/Magick++/Exception.html2
-rw-r--r--www/Magick++/Exception.rst2
-rw-r--r--www/Magick++/FormatCharacters.html2
-rw-r--r--www/Magick++/FormatCharacters.rst2
-rw-r--r--www/Magick++/Geometry.html2
-rw-r--r--www/Magick++/Geometry.rst2
-rw-r--r--www/Magick++/Image.html2
-rw-r--r--www/Magick++/Image.rst2
-rw-r--r--www/Magick++/ImageDesign.html2
-rw-r--r--www/Magick++/ImageDesign.rst2
-rw-r--r--www/Magick++/Montage.html2
-rw-r--r--www/Magick++/Montage.rst2
-rw-r--r--www/Magick++/PixelPacket.html2
-rw-r--r--www/Magick++/PixelPacket.rst2
-rw-r--r--www/Magick++/Pixels.html2
-rw-r--r--www/Magick++/Pixels.rst2
-rw-r--r--www/Magick++/TypeMetric.html2
-rw-r--r--www/Magick++/TypeMetric.rst2
-rw-r--r--www/Magick++/index.html2
-rw-r--r--www/Magick++/index.rst2
-rw-r--r--www/Makefile.am5
-rw-r--r--www/NEWS.html267
-rw-r--r--www/OpenMP.html4
-rw-r--r--www/OpenMP.rst2
-rw-r--r--www/README.html2
-rw-r--r--www/api/api.html2
-rw-r--r--www/api/api.rst2
-rw-r--r--www/api/attribute.html2
-rw-r--r--www/api/image.html8
-rw-r--r--www/api/magick.html143
-rw-r--r--www/api/pixel_cache.html2
-rw-r--r--www/api/transform.html8
-rw-r--r--www/api/types.html2
-rw-r--r--www/api/types.rst2
-rw-r--r--www/authors.html2
-rw-r--r--www/authors.rst2
-rw-r--r--www/benchmarks.html2
-rw-r--r--www/benchmarks.rst2
-rw-r--r--www/configure-target-setup.pngbin34291 -> 8123 bytes
-rw-r--r--www/contribute.html2
-rw-r--r--www/contribute.rst2
-rw-r--r--www/download.html2
-rw-r--r--www/download.rst2
-rw-r--r--www/formats.html2
-rw-r--r--www/formats.rst2
-rw-r--r--www/gm.html13
-rw-r--r--www/index.html6
-rw-r--r--www/index.rst4
-rw-r--r--www/links.html4
-rw-r--r--www/links.rst2
-rw-r--r--www/miff.html2
-rw-r--r--www/miff.rst2
-rw-r--r--www/mission.html2
-rw-r--r--www/mission.rst2
-rw-r--r--www/motion-picture.html2
-rw-r--r--www/motion-picture.rst2
-rw-r--r--www/perl.html2
-rw-r--r--www/perl.rst2
-rw-r--r--www/process.html2
-rw-r--r--www/process.rst2
-rw-r--r--www/programming.html2
-rw-r--r--www/programming.rst2
-rw-r--r--www/project.html2
-rw-r--r--www/project.rst2
-rw-r--r--www/quantize.html2
-rw-r--r--www/quantize.rst2
-rw-r--r--www/reference.html2
-rw-r--r--www/reference.rst2
-rw-r--r--www/security.html4
-rw-r--r--www/security.rst2
-rw-r--r--www/thanks.html2
-rw-r--r--www/thanks.rst2
-rw-r--r--www/tools.html2
-rw-r--r--www/tools.rst2
-rw-r--r--www/utilities.html2
-rw-r--r--www/utilities.rst2
-rw-r--r--www/version.html2
-rw-r--r--www/wand/wand.html2
-rw-r--r--www/wand/wand.rst2
341 files changed, 9716 insertions, 6779 deletions
diff --git a/ChangeLog b/ChangeLog
index 91aff63..2186f10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,1294 +1,324 @@
-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.
diff --git a/ChangeLog.2019 b/ChangeLog.2019
new file mode 100644
index 0000000..e28b10e
--- /dev/null
+++ b/ChangeLog.2019
@@ -0,0 +1,1377 @@
+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".
diff --git a/Copyright.txt b/Copyright.txt
index 31584fc..9035890 100644
--- a/Copyright.txt
+++ b/Copyright.txt
@@ -23,7 +23,7 @@ The licenses which components of this software fall under are as follows.
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
diff --git a/Magick++/lib/Options.cpp b/Magick++/lib/Options.cpp
index 526943a..f19e09e 100644
--- a/Magick++/lib/Options.cpp
+++ b/Magick++/lib/Options.cpp
@@ -1,6 +1,6 @@
// 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
//
@@ -513,8 +513,9 @@ void Magick::Options::strokeDashArray ( const double* strokeDashArray_ )
"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
diff --git a/Makefile.am b/Makefile.am
index a2878b6..9baccb5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -95,6 +95,7 @@ XFAIL_TESTS = \
# should want to concatenate them.
CHANGELOGS = \
ChangeLog \
+ ChangeLog.2019 \
ChangeLog.2018 \
ChangeLog.2017 \
ChangeLog.2016 \
diff --git a/Makefile.in b/Makefile.in
index f95ffe7..7d05bb9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -44,7 +44,7 @@
#
#
-# 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
@@ -2756,6 +2756,7 @@ TESTS_ENVIRONMENT = \
# should want to concatenate them.
CHANGELOGS = \
ChangeLog \
+ ChangeLog.2019 \
ChangeLog.2018 \
ChangeLog.2017 \
ChangeLog.2016 \
@@ -3937,24 +3938,43 @@ MAGICK_INCLUDE_HDRS = \
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
@@ -4349,6 +4369,7 @@ RST2HTML_TARGETS = \
$(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 \
@@ -4467,6 +4488,7 @@ WWW_HTML_FILES = \
$(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 \
@@ -10921,6 +10943,9 @@ uninstall-data-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) < $^ > $@
diff --git a/NEWS.txt b/NEWS.txt
index 8c1b919..c1d0589 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -6,7 +6,7 @@
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
@@ -19,6 +19,128 @@ release and not attempt to patch older releases.
.. 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)
==========================
diff --git a/PerlMagick/Magick.pm b/PerlMagick/Magick.pm
index 158ead4..4052188 100644
--- a/PerlMagick/Magick.pm
+++ b/PerlMagick/Magick.pm
@@ -40,7 +40,7 @@ require AutoLoader;
);
# 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()
diff --git a/PerlMagick/t/composite.t b/PerlMagick/t/composite.t
index 3dfa587..8a9cf07 100644
--- a/PerlMagick/t/composite.t
+++ b/PerlMagick/t/composite.t
@@ -29,7 +29,7 @@ chdir 't' || die 'Cd failed';
# 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);
@@ -42,7 +42,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -53,7 +53,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -64,7 +64,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -75,7 +75,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -87,7 +87,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -99,7 +99,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -110,7 +110,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -122,7 +122,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -133,7 +133,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -147,10 +147,10 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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
@@ -158,7 +158,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -169,7 +169,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -180,7 +180,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -191,7 +191,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -203,7 +203,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -215,7 +215,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -231,7 +231,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -243,7 +243,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
# 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);
@@ -253,7 +253,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/,
#
# 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);
diff --git a/PerlMagick/t/read.t b/PerlMagick/t/read.t
index cd4a273..3d09a4b 100644
--- a/PerlMagick/t/read.t
+++ b/PerlMagick/t/read.t
@@ -1,5 +1,5 @@
#!/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
#
@@ -96,7 +96,7 @@ testReadCompare('input.gif87', 'reference/read/input_gif87.miff', q//, 0, 0);
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;
@@ -352,4 +352,3 @@ print("UYVY format ...\n");
++$test;
testReadCompare('input_70x46.uyvy', 'reference/read/input_uyvy.miff',
q/size=>"70x46", depth=>8/, 0.006, 0.008);
-
diff --git a/PerlMagick/t/reference/composite/Add.miff b/PerlMagick/t/reference/composite/Add.miff
index 441896f..c0d5e2a 100644
--- a/PerlMagick/t/reference/composite/Add.miff
+++ b/PerlMagick/t/reference/composite/Add.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Atop.miff b/PerlMagick/t/reference/composite/Atop.miff
index 17c8881..6e7bc38 100644
--- a/PerlMagick/t/reference/composite/Atop.miff
+++ b/PerlMagick/t/reference/composite/Atop.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Bumpmap.miff b/PerlMagick/t/reference/composite/Bumpmap.miff
index 79157b0..3995cf5 100644
--- a/PerlMagick/t/reference/composite/Bumpmap.miff
+++ b/PerlMagick/t/reference/composite/Bumpmap.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Clear.miff b/PerlMagick/t/reference/composite/Clear.miff
index a83a709..1052d0a 100644
--- a/PerlMagick/t/reference/composite/Clear.miff
+++ b/PerlMagick/t/reference/composite/Clear.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Copy.miff b/PerlMagick/t/reference/composite/Copy.miff
index 433e0c9..0801df1 100644
--- a/PerlMagick/t/reference/composite/Copy.miff
+++ b/PerlMagick/t/reference/composite/Copy.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/CopyBlue.miff b/PerlMagick/t/reference/composite/CopyBlue.miff
index de33204..0a541d9 100644
--- a/PerlMagick/t/reference/composite/CopyBlue.miff
+++ b/PerlMagick/t/reference/composite/CopyBlue.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/CopyGreen.miff b/PerlMagick/t/reference/composite/CopyGreen.miff
index bc3219a..4b2674d 100644
--- a/PerlMagick/t/reference/composite/CopyGreen.miff
+++ b/PerlMagick/t/reference/composite/CopyGreen.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/CopyOpacity.miff b/PerlMagick/t/reference/composite/CopyOpacity.miff
index 71edfc7..936c682 100644
--- a/PerlMagick/t/reference/composite/CopyOpacity.miff
+++ b/PerlMagick/t/reference/composite/CopyOpacity.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/CopyRed.miff b/PerlMagick/t/reference/composite/CopyRed.miff
index 68420b1..f3a818d 100644
--- a/PerlMagick/t/reference/composite/CopyRed.miff
+++ b/PerlMagick/t/reference/composite/CopyRed.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Difference.miff b/PerlMagick/t/reference/composite/Difference.miff
index 3f55440..197fa34 100644
--- a/PerlMagick/t/reference/composite/Difference.miff
+++ b/PerlMagick/t/reference/composite/Difference.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Dissolve.miff b/PerlMagick/t/reference/composite/Dissolve.miff
index 40e8ce1..1ef301c 100644
--- a/PerlMagick/t/reference/composite/Dissolve.miff
+++ b/PerlMagick/t/reference/composite/Dissolve.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Divide.miff b/PerlMagick/t/reference/composite/Divide.miff
index dc40ea9..846c269 100644
--- a/PerlMagick/t/reference/composite/Divide.miff
+++ b/PerlMagick/t/reference/composite/Divide.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/In.miff b/PerlMagick/t/reference/composite/In.miff
index 433e0c9..0801df1 100644
--- a/PerlMagick/t/reference/composite/In.miff
+++ b/PerlMagick/t/reference/composite/In.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Minus.miff b/PerlMagick/t/reference/composite/Minus.miff
index f414e14..8545272 100644
--- a/PerlMagick/t/reference/composite/Minus.miff
+++ b/PerlMagick/t/reference/composite/Minus.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Multiply.miff b/PerlMagick/t/reference/composite/Multiply.miff
index 23fc01e..39fe672 100644
--- a/PerlMagick/t/reference/composite/Multiply.miff
+++ b/PerlMagick/t/reference/composite/Multiply.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Out.miff b/PerlMagick/t/reference/composite/Out.miff
index 591ab02..90dd933 100644
--- a/PerlMagick/t/reference/composite/Out.miff
+++ b/PerlMagick/t/reference/composite/Out.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Over.miff b/PerlMagick/t/reference/composite/Over.miff
index 17c8881..6e7bc38 100644
--- a/PerlMagick/t/reference/composite/Over.miff
+++ b/PerlMagick/t/reference/composite/Over.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Plus.miff b/PerlMagick/t/reference/composite/Plus.miff
index 0e75c04..2696eaa 100644
--- a/PerlMagick/t/reference/composite/Plus.miff
+++ b/PerlMagick/t/reference/composite/Plus.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Subtract.miff b/PerlMagick/t/reference/composite/Subtract.miff
index 31f25e4..b9d61ba 100644
--- a/PerlMagick/t/reference/composite/Subtract.miff
+++ b/PerlMagick/t/reference/composite/Subtract.miff
Binary files differ
diff --git a/PerlMagick/t/reference/composite/Xor.miff b/PerlMagick/t/reference/composite/Xor.miff
index a83a709..1052d0a 100644
--- a/PerlMagick/t/reference/composite/Xor.miff
+++ b/PerlMagick/t/reference/composite/Xor.miff
Binary files differ
diff --git a/PerlMagick/t/reference/read/gradient.miff b/PerlMagick/t/reference/read/gradient.miff
index dc1a215..3f30e79 100644
--- a/PerlMagick/t/reference/read/gradient.miff
+++ b/PerlMagick/t/reference/read/gradient.miff
Binary files differ
diff --git a/PerlMagick/t/reference/wmf/clock.miff b/PerlMagick/t/reference/wmf/clock.miff
index b5ca6d5..be6f4c2 100644
--- a/PerlMagick/t/reference/wmf/clock.miff
+++ b/PerlMagick/t/reference/wmf/clock.miff
Binary files differ
diff --git a/PerlMagick/t/reference/wmf/fulltest.miff b/PerlMagick/t/reference/wmf/fulltest.miff
new file mode 100644
index 0000000..b50305d
--- /dev/null
+++ b/PerlMagick/t/reference/wmf/fulltest.miff
Binary files differ
diff --git a/PerlMagick/t/reference/wmf/ski.miff b/PerlMagick/t/reference/wmf/ski.miff
index be164a3..1a2d466 100644
--- a/PerlMagick/t/reference/wmf/ski.miff
+++ b/PerlMagick/t/reference/wmf/ski.miff
Binary files differ
diff --git a/PerlMagick/t/subroutines.pl b/PerlMagick/t/subroutines.pl
index af54073..c2b8166 100644
--- a/PerlMagick/t/subroutines.pl
+++ b/PerlMagick/t/subroutines.pl
@@ -249,12 +249,12 @@ sub testRead {
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();
@@ -310,7 +310,7 @@ sub testRead {
print "not ok $test\n";
} else {
print "ok $test\n";
- }
+ }
}
@@ -326,7 +326,7 @@ sub testReadCompare {
# Create images
$srcimage=Graphics::Magick->new;
- $refimage=Graphics::Magick->new;
+ $refimage=Graphics::Magick->new;
if ( "$read_options" ne "" ) {
eval "\$status=\$srcimage->Set($read_options);";
@@ -337,7 +337,7 @@ sub testReadCompare {
goto COMPARE_RUNTIME_ERROR;
}
}
-
+
$status=$srcimage->ReadImage("$srcimage_name");
if ("$status")
{
@@ -440,7 +440,7 @@ sub testReadCompare {
#
sub testReadSized {
my( $infile, $size, $depth, $ref_8, $ref_16, $ref_32 ) = @_;
-
+
my($image,$ref_signature);
if ( !defined( $ref_16 ) )
@@ -486,9 +486,9 @@ sub testReadSized {
$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();
@@ -515,7 +515,7 @@ sub testReadSized {
#
sub testReadWrite {
my( $infile, $outfile, $writeoptions, $ref_8, $ref_16, $ref_32 ) = @_;
-
+
my($image);
if ( !defined( $ref_16 ) )
@@ -603,7 +603,7 @@ sub testReadWriteCompare {
$errorinfo='';
$image=Graphics::Magick->new;
- $refimage=Graphics::Magick->new;
+ $refimage=Graphics::Magick->new;
#
# Read the initial image
@@ -749,9 +749,9 @@ sub testReadWriteCompare {
#
sub testReadWriteNoVerify {
my( $infile, $outfile, $writeoptions) = @_;
-
+
my($image, $images);
-
+
$image=Graphics::Magick->new;
$status=$image->ReadImage("$infile");
if( "$status" ) {
@@ -810,7 +810,7 @@ sub testReadWriteNoVerify {
sub testReadWriteSized {
my( $infile, $outfile, $size, $readdepth, $writeoptions, $ref_8, $ref_16,
$ref_32 ) = @_;
-
+
my($image,$depth,$ref_signature);
if ( !defined( $ref_16 ) )
@@ -917,7 +917,7 @@ sub testSetAttribute {
my( $srcimage, $name, $attribute ) = @_;
my($image);
-
+
# Create temporary image
$image=Graphics::Magick->new;
@@ -1031,7 +1031,7 @@ sub testMontage {
'#808080', '#808000', '#FFFFFF', '#FFFF00',
'#800000', '#000080', '#FF0000', '#0000FF',
'#800080', '#008080', '#FF00FF', '#00FFFF' );
-
+
my $color;
foreach $color ( @colors ) {
@@ -1068,7 +1068,7 @@ sub testMontage {
print "not ok $test\n";
return 1;
}
-
+
if( ! ref($montage) ) {
print "not ok $test\n";
} else {
@@ -1079,12 +1079,12 @@ sub testMontage {
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
diff --git a/PerlMagick/t/wmf/read.t b/PerlMagick/t/wmf/read.t
index 3f36734..af508f3 100644
--- a/PerlMagick/t/wmf/read.t
+++ b/PerlMagick/t/wmf/read.t
@@ -29,7 +29,7 @@ testReadCompare('clock.wmf', '../reference/wmf/clock.miff',
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);
diff --git a/README.txt b/README.txt
index 45d88a7..3210bf9 100644
--- a/README.txt
+++ b/README.txt
@@ -391,4 +391,4 @@ building under Microsoft Windows:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/coders/art.c b/coders/art.c
index ee745ed..c0b00cf 100644
--- a/coders/art.c
+++ b/coders/art.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -105,12 +105,12 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -148,6 +148,7 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception)
DONE_READING:
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/avs.c b/coders/avs.c
index ba32404..224a761 100644
--- a/coders/avs.c
+++ b/coders/avs.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -163,7 +163,7 @@ static Image *ReadAVSImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -204,6 +204,8 @@ static Image *ReadAVSImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (MagickFail == status)
break;
+ StopTimer(&image->timer);
+
/*
Proceed to next image.
*/
diff --git a/coders/bmp.c b/coders/bmp.c
index b6cbefe..b6d25c0 100644
--- a/coders/bmp.c
+++ b/coders/bmp.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -1490,6 +1490,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
flipped_image->blob=ReferenceBlob(image->blob);
ReplaceImageInList(&image,flipped_image);
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/braille.c b/coders/braille.c
index 5ed923b..5d9501c 100644
--- a/coders/braille.c
+++ b/coders/braille.c
@@ -224,7 +224,7 @@ static unsigned int WriteBRAILLEImage(const ImageInfo *image_info,
(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);
diff --git a/coders/cals.c b/coders/cals.c
index 7749178..3c562a4 100644
--- a/coders/cals.c
+++ b/coders/cals.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -151,6 +151,9 @@ static Image *ReadCALSImage(const ImageInfo *image_info,ExceptionInfo *exception
FILE
*file;
+ TimerInfo
+ timer;
+
unsigned long
byte_count_pos,
strip_off_pos,
@@ -172,6 +175,7 @@ static Image *ReadCALSImage(const ImageInfo *image_info,ExceptionInfo *exception
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)
@@ -198,20 +202,20 @@ static Image *ReadCALSImage(const ImageInfo *image_info,ExceptionInfo *exception
}
}
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;
@@ -223,29 +227,29 @@ static Image *ReadCALSImage(const ImageInfo *image_info,ExceptionInfo *exception
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);
@@ -345,6 +349,13 @@ static Image *ReadCALSImage(const ImageInfo *image_info,ExceptionInfo *exception
(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);
}
diff --git a/coders/caption.c b/coders/caption.c
index 19f2812..9573c2f 100644
--- a/coders/caption.c
+++ b/coders/caption.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -123,6 +123,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
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);
@@ -181,6 +182,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
(void) AnnotateImage(image,draw_info);
DestroyDrawInfo(draw_info);
MagickFreeMemory(caption);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/cineon.c b/coders/cineon.c
index 34e652b..93daec9 100644
--- a/coders/cineon.c
+++ b/coders/cineon.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -930,6 +930,7 @@ static Image *ReadCINEONImage(const ImageInfo *image_info,
if (EOFBlob(image))
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(GetFirstImageInList(image));
}
@@ -1111,11 +1112,20 @@ static void GenerateCineonTimeStamp(char *date_str, size_t date_str_length, char
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(&current_time);
+#if defined(HAVE_LOCALTIME_R)
+ t=localtime_r(&current_time, &tm_buf);
+#else
+ t=localtime(&current_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);
diff --git a/coders/clipboard.c b/coders/clipboard.c
index 2999481..c038071 100644
--- a/coders/clipboard.c
+++ b/coders/clipboard.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -197,6 +197,7 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info,ExceptionInfo *exce
}
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif /* HasWINGDI32 */
diff --git a/coders/cmyk.c b/coders/cmyk.c
index 163d70c..fb3d2d0 100644
--- a/coders/cmyk.c
+++ b/coders/cmyk.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -190,7 +190,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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, "
@@ -267,7 +267,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -320,7 +320,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -368,7 +368,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -402,7 +402,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -436,7 +436,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -470,7 +470,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -509,7 +509,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
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;
@@ -525,6 +525,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/cut.c b/coders/cut.c
index a5821a0..af623b3 100644
--- a/coders/cut.c
+++ b/coders/cut.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -609,6 +609,7 @@ static Image *ReadCUTImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (EOFBlob(image))
ThrowCUTReaderException(CorruptImageError,UnexpectedEndOfFile,image);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/dcm.c b/coders/dcm.c
index 9988879..d0c6270 100644
--- a/coders/dcm.c
+++ b/coders/dcm.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -6455,7 +6455,7 @@ static MagickPassFail DCM_SetupRescaleMap(Image *image,DicomStream *dcm,Exceptio
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)
{
@@ -6470,13 +6470,13 @@ static MagickPassFail DCM_SetupRescaleMap(Image *image,DicomStream *dcm,Exceptio
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
@@ -6493,7 +6493,7 @@ static MagickPassFail DCM_SetupRescaleMap(Image *image,DicomStream *dcm,Exceptio
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)
@@ -7625,6 +7625,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
break;
}
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
diff --git a/coders/dib.c b/coders/dib.c
index d7c226b..4a191f4 100644
--- a/coders/dib.c
+++ b/coders/dib.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -272,7 +272,7 @@ static MagickPassFail DecodeImage(Image *image,const unsigned long compression,
*/
x=0;
y++;
- q=pixels+y*image->columns;
+ q=pixels+(size_t) y*image->columns;
break;
}
case 0x02:
@@ -288,7 +288,7 @@ static MagickPassFail DecodeImage(Image *image,const unsigned long compression,
if (byte == EOF)
return MagickFail;
y+=byte;
- q=pixels+y*image->columns+x;
+ q=pixels+y*(size_t) image->columns+x;
break;
}
default:
@@ -428,7 +428,7 @@ static size_t EncodeImage(Image *image,const size_t bytes_per_line,
/*
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;
@@ -553,6 +553,9 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
register unsigned char
*p;
+ TimerInfo
+ timer;
+
size_t
count,
length;
@@ -578,6 +581,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -684,7 +688,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
unsigned char
*dib_colormap;
- unsigned int
+ size_t
packet_size;
/*
@@ -792,7 +796,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
(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);
@@ -818,7 +822,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
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;
@@ -850,7 +854,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -867,7 +871,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
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;
@@ -897,7 +901,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -916,7 +920,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -935,7 +939,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -955,10 +959,10 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
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;
@@ -985,7 +989,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -1003,7 +1007,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
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;
@@ -1021,7 +1025,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -1098,7 +1102,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -1126,7 +1130,6 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*flipped_image;
-
/*
Correct image orientation.
*/
@@ -1142,6 +1145,8 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
image=flipped_image;
}
CloseBlob(image);
+ StopTimer(&timer);
+ image->timer=timer;
return(image);
}
@@ -1491,7 +1496,7 @@ static unsigned int WriteDIBImage(const ImageInfo *image_info,Image *image)
/*
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)
{
@@ -1528,7 +1533,7 @@ static unsigned int WriteDIBImage(const ImageInfo *image_info,Image *image)
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);
@@ -1549,7 +1554,7 @@ static unsigned int WriteDIBImage(const ImageInfo *image_info,Image *image)
*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);
}
diff --git a/coders/dps.c b/coders/dps.c
index 02374e3..263483f 100644
--- a/coders/dps.c
+++ b/coders/dps.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -526,6 +526,7 @@ static Image *ReadDPSImage(const ImageInfo *image_info,
MagickXFreeResources(display,visual_info,map_info,(MagickXPixelInfo *) NULL,
(XFontStruct *) NULL,&resource_info,(MagickXWindowInfo *) NULL);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#else
diff --git a/coders/dpx.c b/coders/dpx.c
index 53fc83f..54e61fb 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -2173,6 +2173,7 @@ STATIC Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
if (image_info->ping)
{
+ StopTimer(&image->timer);
CloseBlob(image);
return(image);
}
@@ -3051,6 +3052,7 @@ STATIC Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
MagickFreeMemory(map_Y);
DestroyThreadViewDataSet(scanline_set);
DestroyThreadViewDataSet(samples_set);
+ StopTimer(&image->timer);
CloseBlob(image);
return(image);
}
@@ -3154,6 +3156,11 @@ STATIC void GenerateDPXTimeStamp(char *timestamp, size_t maxsize)
time_t
current_time;
+#if defined(HAVE_LOCALTIME_R)
+ struct tm
+ tm_buf;
+#endif /* if defined(HAVE_LOCALTIME_R) */
+
const struct tm
*t;
@@ -3161,7 +3168,11 @@ STATIC void GenerateDPXTimeStamp(char *timestamp, size_t maxsize)
p;
current_time=time((time_t *) NULL);
- t=localtime(&current_time);
+#if defined(HAVE_LOCALTIME_R)
+ t=localtime_r(&current_time, &tm_buf);
+#else
+ t=localtime(&current_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';
diff --git a/coders/emf.c b/coders/emf.c
index 7086373..16b9516 100644
--- a/coders/emf.c
+++ b/coders/emf.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -410,6 +410,7 @@ static Image *ReadEMFImage(const ImageInfo *image_info,
SelectObject(hDC,hOldBitmap);
DeleteDC(hDC);
DeleteObject(hBitmap);
+ StopTimer(&image->timer);
return(image);
}
#endif /* HasWINGDI32 */
diff --git a/coders/fax.c b/coders/fax.c
index 2c888d2..5e32a25 100644
--- a/coders/fax.c
+++ b/coders/fax.c
@@ -161,6 +161,7 @@ static Image *ReadFAXImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -174,6 +175,7 @@ static Image *ReadFAXImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/fits.c b/coders/fits.c
index 8158a86..7ef62c2 100644
--- a/coders/fits.c
+++ b/coders/fits.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -621,7 +621,7 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
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 );
@@ -661,6 +661,8 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
break;
}
+ StopTimer(&image->timer);
+
/*
Proceed to next image.
*/
@@ -773,8 +775,8 @@ int InsertRowHDU(char *buffer, const char *data, int offset)
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;
@@ -927,11 +929,11 @@ static MagickPassFail WriteFITSImage(const ImageInfo *image_info,Image *image)
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);
diff --git a/coders/fpx.c b/coders/fpx.c
index 9ef234f..0738732 100644
--- a/coders/fpx.c
+++ b/coders/fpx.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -456,6 +456,7 @@ static Image *ReadFPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
MagickFreeMemory(scanline);
(void) FPX_CloseImage(flashpix);
FPX_ClearSystem();
+ StopTimer(&image->timer);
return(image);
}
#else
diff --git a/coders/gif.c b/coders/gif.c
index ea51a9d..8fac9e9 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -907,10 +907,10 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -1120,7 +1120,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -1156,6 +1156,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -1498,7 +1499,7 @@ static MagickPassFail WriteGIFImage(const ImageInfo *image_info,Image *image)
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];
}
@@ -1582,17 +1583,17 @@ static MagickPassFail WriteGIFImage(const ImageInfo *image_info,Image *image)
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.
diff --git a/coders/gradient.c b/coders/gradient.c
index e81de62..3a3cae0 100644
--- a/coders/gradient.c
+++ b/coders/gradient.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -36,9 +36,12 @@
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"
@@ -59,6 +62,29 @@
% 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,
@@ -89,6 +115,9 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
Image
*image;
+ const char *
+ gravity;
+
/*
Initialize Image structure.
*/
@@ -105,6 +134,8 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
(void) sscanf(image_info->filename,"%[^-]",colorname);
if (!QueryColorDatabase(colorname,&start_color,exception))
{
+ /* Promote warning to error */
+ exception->severity = OptionError;
DestroyImage(image);
return((Image *) NULL);
}
@@ -114,10 +145,20 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
(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);
}
diff --git a/coders/gray.c b/coders/gray.c
index 3a4e3e2..62f4aed 100644
--- a/coders/gray.c
+++ b/coders/gray.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -252,7 +252,7 @@ static Image *ReadGRAYImage(const ImageInfo *image_info,
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.
*/
@@ -319,7 +319,7 @@ static Image *ReadGRAYImage(const ImageInfo *image_info,
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;
@@ -329,6 +329,7 @@ static Image *ReadGRAYImage(const ImageInfo *image_info,
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/histogram.c b/coders/histogram.c
index 6741b14..d24a3b9 100644
--- a/coders/histogram.c
+++ b/coders/histogram.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -45,6 +45,7 @@
#include "magick/magick.h"
#include "magick/monitor.h"
#include "magick/tempfile.h"
+#include "magick/quantize.h"
#include "magick/utility.h"
/*
@@ -154,7 +155,7 @@ ModuleExport void UnregisterHISTOGRAMImage(void)
%
*/
static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
- Image *image)
+ Image *image)
{
#define HistogramDensity "256x200"
@@ -209,12 +210,12 @@ static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
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);
@@ -233,7 +234,7 @@ static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
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));
@@ -241,28 +242,28 @@ static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
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
@@ -271,42 +272,42 @@ static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
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.
*/
@@ -319,25 +320,45 @@ static unsigned int WriteHISTOGRAMImage(const ImageInfo *image_info,
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);
diff --git a/coders/hrz.c b/coders/hrz.c
index cf12cc3..1d92f33 100644
--- a/coders/hrz.c
+++ b/coders/hrz.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -103,7 +103,7 @@ static Image *ReadHRZImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -142,6 +142,7 @@ static Image *ReadHRZImage(const ImageInfo *image_info,ExceptionInfo *exception)
DONE_READING:
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/icon.c b/coders/icon.c
index 6892498..eaa871c 100644
--- a/coders/icon.c
+++ b/coders/icon.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -345,6 +345,7 @@ static Image *ReadIconImage(const ImageInfo *image_info,
(void) strlcpy(icon_image->magick,image_info->magick,
sizeof(icon_image->magick));
ReplaceImageInList(&image,icon_image);
+ StopTimer(&image->timer);
/*
Proceed to next image.
diff --git a/coders/identity.c b/coders/identity.c
index 5a7d414..6b615af 100644
--- a/coders/identity.c
+++ b/coders/identity.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -170,6 +170,10 @@ static Image *ReadIdentityImage(const ImageInfo *image_info,
DestroyImage(image);
image=(Image *) NULL;
}
+ else
+ {
+ StopTimer(&image->timer);
+ }
return(image);
}
diff --git a/coders/jbig.c b/coders/jbig.c
index 1fc7b36..c39647e 100644
--- a/coders/jbig.c
+++ b/coders/jbig.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -87,7 +87,7 @@ static unsigned int
%
*/
static Image *ReadJBIGImage(const ImageInfo *image_info,
- ExceptionInfo *exception)
+ ExceptionInfo *exception)
{
#define MaxBufferSize 8192
@@ -134,7 +134,7 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
*/
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;
@@ -146,19 +146,19 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
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.
*/
@@ -203,29 +203,29 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
{
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.
@@ -235,6 +235,7 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
CloseBlob(image);
image->is_grayscale=MagickTrue;
image->is_monochrome=MagickTrue;
+ StopTimer(&image->timer);
return(image);
}
#endif
diff --git a/coders/jnx.c b/coders/jnx.c
index cd453a0..1003adc 100644
--- a/coders/jnx.c
+++ b/coders/jnx.c
@@ -101,7 +101,7 @@ ExtractTileJPG(Image * image, const ImageInfo * image_info,
char img_label_str[MaxTextExtent];
- alloc_size = TileInfo->PicSize + 2;
+ alloc_size = (size_t) TileInfo->PicSize + 2;
if (image->logging)
(void) LogMagickEvent(CoderEvent, GetMagickModule(),
diff --git a/coders/jp2.c b/coders/jp2.c
index 276dbb6..31fd32f 100644
--- a/coders/jp2.c
+++ b/coders/jp2.c
@@ -580,7 +580,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,
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++)
@@ -707,6 +707,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,
jas_matrix_destroy(pixels);
(void) jas_stream_close(jp2_stream);
jas_image_destroy(jp2_image);
+ StopTimer(&image->timer);
return(image);
}
#endif
@@ -1190,7 +1191,7 @@ WriteJP2Image(const ImageInfo *image_info,Image *image)
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)*
diff --git a/coders/jpeg.c b/coders/jpeg.c
index e3f3c90..c1b7956 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -446,6 +446,25 @@ static void JPEGErrorHandler(j_common_ptr jpeg_info)
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
@@ -457,20 +476,22 @@ static boolean ReadComment(j_decompress_ptr jpeg_info)
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;
@@ -479,9 +500,11 @@ static boolean ReadComment(j_decompress_ptr jpeg_info)
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';
@@ -511,18 +534,15 @@ static boolean ReadGenericProfile(j_decompress_ptr jpeg_info)
*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;
@@ -544,7 +564,14 @@ static boolean ReadGenericProfile(j_decompress_ptr jpeg_info)
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.
@@ -568,7 +595,7 @@ static boolean ReadGenericProfile(j_decompress_ptr jpeg_info)
/*
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(),
@@ -577,7 +604,7 @@ static boolean ReadGenericProfile(j_decompress_ptr jpeg_info)
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)
@@ -591,20 +618,22 @@ 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)
{
@@ -639,9 +668,14 @@ static boolean ReadICCProfile(j_decompress_ptr jpeg_info)
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);
}
@@ -669,11 +703,13 @@ static boolean ReadIPTCProfile(j_decompress_ptr jpeg_info)
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);
@@ -740,10 +776,15 @@ static boolean ReadIPTCProfile(j_decompress_ptr jpeg_info)
"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);
}
@@ -1704,6 +1745,7 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
if (image->logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"return");
GetImageException(image,exception);
+ StopTimer(&image->timer);
return(image);
}
#endif
diff --git a/coders/label.c b/coders/label.c
index c252859..80ede22 100644
--- a/coders/label.c
+++ b/coders/label.c
@@ -161,6 +161,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
(void) SetImage(image,OpaqueOpacity);
(void) AnnotateImage(image,draw_info);
DestroyDrawInfo(draw_info);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/locale.c b/coders/locale.c
index cd7330d..c29137a 100644
--- a/coders/locale.c
+++ b/coders/locale.c
@@ -1,5 +1,5 @@
/*
-% 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
diff --git a/coders/logo.c b/coders/logo.c
index 7ec511d..04823c5 100644
--- a/coders/logo.c
+++ b/coders/logo.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -4991,12 +4991,16 @@ static Image *ReadLOGOImage(const ImageInfo *image_info,
const void
*blob;
+ TimerInfo
+ timer;
+
size_t
extent;
unsigned int
i;
+ GetTimerInfo(&timer);
clone_info=CloneImageInfo(image_info);
image=(Image *) NULL;
blob=NULL;
@@ -5030,19 +5034,37 @@ static Image *ReadLOGOImage(const ImageInfo *image_info,
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);
diff --git a/coders/mac.c b/coders/mac.c
index e483748..16b221e 100644
--- a/coders/mac.c
+++ b/coders/mac.c
@@ -1,6 +1,5 @@
/*
-% 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
@@ -13,9 +12,9 @@
% 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 %
@@ -85,25 +84,25 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -112,87 +111,88 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
}
diff --git a/coders/map.c b/coders/map.c
index 597b19b..7be0c87 100644
--- a/coders/map.c
+++ b/coders/map.c
@@ -146,8 +146,8 @@ static Image *ReadMAPImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
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)
@@ -187,8 +187,8 @@ static Image *ReadMAPImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++)
{
@@ -383,8 +383,8 @@ static unsigned int WriteMAPImage(const ImageInfo *image_info,Image *image)
*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);
/*
diff --git a/coders/mat.c b/coders/mat.c
index 903aaad..151f96c 100644
--- a/coders/mat.c
+++ b/coders/mat.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -591,7 +591,7 @@ size_t (*ReadBlobXXXFloats)(Image *image, size_t len, float *data);
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;
}
@@ -702,6 +702,8 @@ size_t (*ReadBlobXXXFloats)(Image *image, size_t len, float *data);
image = rotated_image;
}
+ StopTimer(&image->timer);
+
skip_reading_current:
if (image_info->subrange != 0)
@@ -1273,7 +1275,7 @@ skip_reading_current:
/* 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;
@@ -1395,13 +1397,20 @@ static MagickPassFail WriteMATLABImage(const ImageInfo *image_info,Image *image)
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(&current_time);
+#if defined(HAVE_LOCALTIME_R)
+ t=localtime_r(&current_time, &tm_buf);
+#else
+ t=localtime(&current_time); /* Thread-unsafe version */
+#endif /* if defined(HAVE_LOCALTIME_R) */
/*
Open output image file.
diff --git a/coders/meta.c b/coders/meta.c
index 5427e35..1bf3725 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -1780,7 +1780,7 @@ iptc_find:
else
{
/* short format */
- tag_length=((long) c) << 8;
+ tag_length=((size_t) c) << 8;
c=(*p++);
blob_length--;
if (blob_length == 0)
@@ -1986,7 +1986,7 @@ static int formatIPTC(Image *ifile, Image *ofile)
}
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");
@@ -2113,7 +2113,7 @@ static int formatIPTCfromBuffer(Image *ofile, char *s, long len)
}
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");
@@ -2225,7 +2225,7 @@ static int format8BIM(Image *ifile, Image *ofile)
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,
@@ -2409,7 +2409,7 @@ static MagickPassFail WriteMETAImage(const ImageInfo *image_info,Image *image)
*buff;
size_t
- iptc_offset,
+ iptc_offset = 0,
length;
const unsigned char
@@ -2418,9 +2418,9 @@ static MagickPassFail WriteMETAImage(const ImageInfo *image_info,Image *image)
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);
diff --git a/coders/miff.c b/coders/miff.c
index 58d075e..b270f56 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -1922,6 +1922,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
DestroyImageList(image);
return((Image *) NULL);
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/mono.c b/coders/mono.c
index d659293..2d5b7af 100644
--- a/coders/mono.c
+++ b/coders/mono.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -136,6 +136,7 @@ static Image *ReadMONOImage(const ImageInfo *image_info,
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
@@ -172,6 +173,7 @@ static Image *ReadMONOImage(const ImageInfo *image_info,
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/mpc.c b/coders/mpc.c
index de9bc0d..e486b90 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -629,7 +629,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -886,11 +886,11 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++)
@@ -931,6 +931,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
status=PersistCache(image,cache_filename,MagickTrue,&offset,exception);
if (status == MagickFail)
ThrowMPCReaderException(CacheError,UnableToPeristPixelCache,image);
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
@@ -1390,7 +1391,7 @@ static MagickPassFail WriteMPCImage(const ImageInfo *image_info,Image *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);
/*
@@ -1417,7 +1418,7 @@ static MagickPassFail WriteMPCImage(const ImageInfo *image_info,Image *image)
}
#endif /* QuantumDepth > 8 */
- (void) WriteBlob(image,packet_size*image->colors,colormap);
+ (void) WriteBlob(image, (size_t) packet_size*image->colors,colormap);
MagickFreeMemory(colormap);
}
/*
diff --git a/coders/mpeg.c b/coders/mpeg.c
index b058b08..c6abc8d 100644
--- a/coders/mpeg.c
+++ b/coders/mpeg.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -247,6 +247,11 @@ static unsigned int WriteMPEGParameterFiles(const ImageInfo *image_info,
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).
*/
@@ -313,7 +318,7 @@ static unsigned int WriteMPEGParameterFiles(const ImageInfo *image_info,
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);
@@ -488,7 +493,7 @@ static unsigned int WriteMPEGImage(const ImageInfo *image_info,Image *image)
*/
if(!AcquireTemporaryFileName(basename))
{
- DestroyImage(coalesce_image);
+ DestroyImageList(coalesce_image);
ThrowWriterTemporaryFileException(basename);
}
FormatString(coalesce_image->filename,"%.1024s",basename);
diff --git a/coders/mtv.c b/coders/mtv.c
index b1d1a25..4db7bf8 100644
--- a/coders/mtv.c
+++ b/coders/mtv.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -160,7 +160,7 @@ static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -192,6 +192,7 @@ static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/mvg.c b/coders/mvg.c
index 692e66a..36c64c6 100644
--- a/coders/mvg.c
+++ b/coders/mvg.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -237,6 +237,7 @@ static Image *ReadMVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
(void) DrawImage(image,draw_info);
DestroyDrawInfo(draw_info);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/null.c b/coders/null.c
index 3aa5eab..704d515 100644
--- a/coders/null.c
+++ b/coders/null.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -111,8 +111,10 @@ static Image *ReadNULLImage(const ImageInfo *image_info,
(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);
}
@@ -120,6 +122,7 @@ static Image *ReadNULLImage(const ImageInfo *image_info,
ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
image->colormap[0]=image->background_color;
status=SetImageEx(image,OpaqueOpacity,exception);
+ StopTimer(&image->timer);
if (status == MagickFail)
{
DestroyImage(image);
diff --git a/coders/otb.c b/coders/otb.c
index 1988398..4805f73 100644
--- a/coders/otb.c
+++ b/coders/otb.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -143,6 +143,7 @@ static Image *ReadOTBImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -186,6 +187,7 @@ static Image *ReadOTBImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/palm.c b/coders/palm.c
index 7cc0328..1e9df02 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -1090,6 +1090,7 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -1255,6 +1256,7 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
MagickFreeMemory(one_row);
MagickFreeMemory(lastrow);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/pcd.c b/coders/pcd.c
index d9610b5..d2678bf 100644
--- a/coders/pcd.c
+++ b/coders/pcd.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -190,7 +190,7 @@ static void Upsample(const unsigned long width,const unsigned long height,
break; \
p=buffer; \
} \
- sum|=((unsigned int) (*p) << (24-bits)); \
+ sum|=(((unsigned int) (*p)) << (24-bits)); \
bits+=8; \
p++; \
} \
@@ -261,6 +261,7 @@ static MagickPassFail DecodeImage(Image *image,unsigned char *luma,
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,
@@ -305,6 +306,12 @@ static MagickPassFail DecodeImage(Image *image,unsigned char *luma,
}
pcd_length[i]=(unsigned int) length;
}
+ if (EOFBlob(image))
+ {
+ status=MagickFail;
+ goto decode_image_error;
+ }
+
/*
Search for Sync byte.
*/
@@ -744,6 +751,7 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->colorspace=YCCColorspace;
if (TransformColorspace(image,RGBColorspace) != MagickPass)
break;
+ StopTimer(&image->timer);
if (j < (long) number_images)
{
/*
@@ -904,6 +912,7 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
}
diff --git a/coders/pcl.c b/coders/pcl.c
index e6f671e..a5e80c9 100644
--- a/coders/pcl.c
+++ b/coders/pcl.c
@@ -600,7 +600,7 @@ static unsigned long PCL_TiffRLECompress(unsigned long row_width,
*/
if (unrep)
{
- q -= (unrep + rep);
+ q -= ((size_t) unrep + rep);
while (unrep)
{
unrep_this_time = (unrep >= 128)?128:unrep;
@@ -726,7 +726,7 @@ static unsigned long PCL_RLECompress(unsigned long row_width,
*/
if (unrep)
{
- q -= (unrep + rep);
+ q -= ((size_t) unrep + rep);
while (unrep)
{
*out++=0;
diff --git a/coders/pcx.c b/coders/pcx.c
index addcee3..b7fe16c 100644
--- a/coders/pcx.c
+++ b/coders/pcx.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -520,8 +520,8 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -604,7 +604,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++)
{
@@ -620,7 +620,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
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;
@@ -781,6 +781,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
@@ -1008,7 +1009,7 @@ static unsigned int WritePCXImage(const ImageInfo *image_info,Image *image)
*q;
size_t
- length;
+ bytes_per_line;
unsigned char
*pcx_colormap = (unsigned char *) NULL,
@@ -1126,8 +1127,16 @@ static unsigned int WritePCXImage(const ImageInfo *image_info,Image *image)
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;
/*
@@ -1168,8 +1177,7 @@ static unsigned int WritePCXImage(const ImageInfo *image_info,Image *image)
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;
diff --git a/coders/pdb.c b/coders/pdb.c
index 130d354..bc2ec62 100644
--- a/coders/pdb.c
+++ b/coders/pdb.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -497,6 +497,7 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -703,6 +704,7 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
MagickFreeMemory(comment);
}
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -896,7 +898,9 @@ static unsigned int WritePDBImage(const ImageInfo *image_info,Image *image)
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);
@@ -965,7 +969,7 @@ static unsigned int WritePDBImage(const ImageInfo *image_info,Image *image)
{
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++)
{
@@ -1026,8 +1030,8 @@ static unsigned int WritePDBImage(const ImageInfo *image_info,Image *image)
/*
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);
@@ -1060,7 +1064,7 @@ static unsigned int WritePDBImage(const ImageInfo *image_info,Image *image)
(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);
diff --git a/coders/pdf.c b/coders/pdf.c
index 0957acc..bf96656 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -660,6 +660,11 @@ static unsigned int WritePDFImage(const ImageInfo *image_info,Image *image)
fax_blob_length,
length;
+#if defined(HAVE_LOCALTIME_R)
+ struct tm
+ tm_buf;
+#endif /* if defined(HAVE_LOCALTIME_R) */
+
struct tm
*time_meridian;
@@ -718,7 +723,12 @@ static unsigned int WritePDFImage(const ImageInfo *image_info,Image *image)
(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);
@@ -778,7 +788,7 @@ static unsigned int WritePDFImage(const ImageInfo *image_info,Image *image)
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);
}
@@ -1016,8 +1026,8 @@ static unsigned int WritePDFImage(const ImageInfo *image_info,Image *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);
@@ -1317,7 +1327,7 @@ static unsigned int WritePDFImage(const ImageInfo *image_info,Image *image)
/*
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,
diff --git a/coders/pict.c b/coders/pict.c
index ccaa117..3e15ea9 100644
--- a/coders/pict.c
+++ b/coders/pict.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -90,8 +90,9 @@
*/
#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.
@@ -112,22 +113,22 @@
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;
@@ -135,7 +136,7 @@ typedef struct _PICTPixmap
typedef struct _PICTRectangle
{
- short
+ magick_uint16_t
top,
left,
bottom,
@@ -769,12 +770,8 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
const unsigned int bits_per_pixel)
{
unsigned long
- j,
y;
- register unsigned long
- i;
-
register const unsigned char
*p;
@@ -783,6 +780,7 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
size_t
allocated_pixels,
+ scanline_alloc,
row_bytes;
unsigned char
@@ -791,15 +789,19 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
*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)
@@ -878,17 +880,23 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
/*
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,
@@ -903,7 +911,7 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
*/
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)
{
@@ -922,45 +930,44 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
*/
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;
}
@@ -971,7 +978,7 @@ static unsigned char *DecodeImage(const ImageInfo *image_info,
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!");
@@ -1244,6 +1251,9 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
size_t
length;
+ magick_off_t
+ file_size;
+
unsigned int
jpeg,
status;
@@ -1259,6 +1269,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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;
/*
@@ -1287,25 +1298,11 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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(),
@@ -1314,6 +1311,17 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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.
*/
@@ -1645,8 +1653,8 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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
@@ -1655,16 +1663,16 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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++;
@@ -1674,7 +1682,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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,
@@ -1783,61 +1791,93 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
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;
@@ -1873,6 +1913,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -2002,8 +2043,8 @@ static unsigned int WritePICTImage(const ImageInfo *image_info,Image *image)
#define PictVersion 0x11
double
- x_resolution,
- y_resolution;
+ x_resolution = 72.0,
+ y_resolution = 72.0;
long
y;
@@ -2099,8 +2140,19 @@ static unsigned int WritePICTImage(const ImageInfo *image_info,Image *image)
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;
@@ -2121,7 +2173,7 @@ static unsigned int WritePICTImage(const ImageInfo *image_info,Image *image)
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)
/*
@@ -2133,7 +2185,7 @@ static unsigned int WritePICTImage(const ImageInfo *image_info,Image *image)
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) ||
@@ -2389,8 +2441,8 @@ static unsigned int WritePICTImage(const ImageInfo *image_info,Image *image)
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);
@@ -2398,13 +2450,13 @@ static unsigned int WritePICTImage(const ImageInfo *image_info,Image *image)
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++)
{
diff --git a/coders/pix.c b/coders/pix.c
index c65cc15..470f929 100644
--- a/coders/pix.c
+++ b/coders/pix.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -208,6 +208,7 @@ static Image *ReadPIXImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
if (image->storage_class == PseudoClass)
(void) SyncImage(image);
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/plasma.c b/coders/plasma.c
index cd3cdc5..91ac465 100644
--- a/coders/plasma.c
+++ b/coders/plasma.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -131,6 +131,8 @@ static Image *ReadPlasmaImage(const ImageInfo *image_info,
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++)
{
@@ -176,6 +178,7 @@ static Image *ReadPlasmaImage(const ImageInfo *image_info,
if (PlasmaImage(image,&segment_info,0,depth))
break;
}
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/png.c b/coders/png.c
index 31e8513..60ce8dc 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -2301,7 +2301,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
" 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
@@ -2309,7 +2309,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
}
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");
@@ -3952,6 +3952,8 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
SetMagickResourceLimit(WidthResource,width_resource);
SetMagickResourceLimit(HeightResource,height_resource);
+ StopTimer(&image->timer);
+
return (image);
}
@@ -4451,6 +4453,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
#endif
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
@@ -4891,6 +4894,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
*/
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
AllocateNextImage(image_info,image);
if (image->next == (Image *) NULL)
{
@@ -5491,6 +5495,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
{
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
@@ -5542,6 +5547,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
{
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
@@ -5586,6 +5592,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
first_mng_object=MagickFalse;
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
@@ -6204,6 +6211,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
" background layer.");
if (AccessMutablePixels(image) != (PixelPacket *) NULL)
{
+ StopTimer(&image->timer);
/*
Allocate next image structure.
*/
@@ -8815,7 +8823,7 @@ static MagickPassFail WritePNGImage(const ImageInfo *image_info,Image *image)
/* 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;
@@ -8847,11 +8855,22 @@ static MagickPassFail WriteOneJNGImage(MngInfo *mng_info,
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);
}
@@ -9297,6 +9316,14 @@ static MagickPassFail WriteOneJNGImage(MngInfo *mng_info,
" 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(),
@@ -9406,7 +9433,6 @@ static MagickPassFail WriteJNGImage(const ImageInfo *image_info,Image *image)
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()");
diff --git a/coders/pnm.c b/coders/pnm.c
index 5fddd5c..cf4aacb 100644
--- a/coders/pnm.c
+++ b/coders/pnm.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -961,7 +961,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
}
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);
}
@@ -1154,6 +1154,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
default:
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
@@ -1938,7 +1939,7 @@ static unsigned int WritePNMImage(const ImageInfo *image_info,Image *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);
}
diff --git a/coders/preview.c b/coders/preview.c
index 8c15a04..32fbedd 100644
--- a/coders/preview.c
+++ b/coders/preview.c
@@ -271,7 +271,8 @@ static unsigned int WritePreviewImage(const ImageInfo *image_info,Image *image)
{
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));
@@ -320,7 +321,8 @@ static unsigned int WritePreviewImage(const ImageInfo *image_info,Image *image)
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;
@@ -549,9 +551,9 @@ static unsigned int WritePreviewImage(const ImageInfo *image_info,Image *image)
}
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;
}
diff --git a/coders/ps.c b/coders/ps.c
index da6436d..a20214a 100644
--- a/coders/ps.c
+++ b/coders/ps.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -261,10 +261,10 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -787,6 +787,9 @@ static unsigned int WritePSImage(const ImageInfo *image_info,Image *image)
/*
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
@@ -796,15 +799,18 @@ static unsigned int WritePSImage(const ImageInfo *image_info,Image *image)
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
@@ -1200,10 +1206,10 @@ static unsigned int WritePSImage(const ImageInfo *image_info,Image *image)
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");
diff --git a/coders/ps2.c b/coders/ps2.c
index fe2ed80..9b7e0dd 100644
--- a/coders/ps2.c
+++ b/coders/ps2.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -511,7 +511,10 @@ static unsigned int WritePS2Image(const ImageInfo *image_info,Image *image)
/*
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");
@@ -520,15 +523,18 @@ static unsigned int WritePS2Image(const ImageInfo *image_info,Image *image)
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
@@ -757,10 +763,10 @@ static unsigned int WritePS2Image(const ImageInfo *image_info,Image *image)
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");
@@ -960,8 +966,8 @@ static unsigned int WritePS2Image(const ImageInfo *image_info,Image *image)
/*
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);
diff --git a/coders/ps3.c b/coders/ps3.c
index 1a7bcd1..77e585b 100644
--- a/coders/ps3.c
+++ b/coders/ps3.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -450,7 +450,7 @@ static unsigned int SerializePseudoClassImage(const ImageInfo *image_info,
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);
@@ -528,7 +528,7 @@ static unsigned int SerializeMultiChannelImage(const ImageInfo *image_info,
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);
@@ -1371,6 +1371,9 @@ static MagickPassFail WritePS3Image(const ImageInfo *image_info,Image *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));
@@ -1389,8 +1392,11 @@ static MagickPassFail WritePS3Image(const ImageInfo *image_info,Image *image)
/* 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);
diff --git a/coders/pwp.c b/coders/pwp.c
index c6331a2..cdfe2a8 100644
--- a/coders/pwp.c
+++ b/coders/pwp.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -226,6 +226,7 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
(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;
diff --git a/coders/rgb.c b/coders/rgb.c
index ba1c486..ce53b93 100644
--- a/coders/rgb.c
+++ b/coders/rgb.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -191,7 +191,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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.
*/
@@ -261,7 +261,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -310,7 +310,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -358,7 +358,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -392,7 +392,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -426,7 +426,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -465,7 +465,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -481,6 +481,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/rla.c b/coders/rla.c
index 615f01d..02bbc67 100644
--- a/coders/rla.c
+++ b/coders/rla.c
@@ -711,6 +711,7 @@ static Image *ReadRLAImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowRLAReaderException(CorruptImageError,UnexpectedEndOfFile,image);
CloseBlob(image);
MagickFreeMemory(scanlines);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/rle.c b/coders/rle.c
index fe4310b..dbffc21 100644
--- a/coders/rle.c
+++ b/coders/rle.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -309,7 +309,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -400,7 +400,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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(),
@@ -439,6 +439,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
MagickFreeMemory(colormap);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -544,7 +545,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++)
@@ -579,7 +580,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
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++)
{
@@ -767,6 +768,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowRLEReaderException(CorruptImageError,UnexpectedEndOfFile,image);
}
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/sct.c b/coders/sct.c
index 95db45e..1030302 100644
--- a/coders/sct.c
+++ b/coders/sct.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -206,6 +206,7 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -283,6 +284,7 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/sfw.c b/coders/sfw.c
index 87914e9..277ee43 100644
--- a/coders/sfw.c
+++ b/coders/sfw.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -224,6 +224,9 @@ static Image *ReadSFWImage(const ImageInfo *image_info,ExceptionInfo *exception)
size_t
buffer_size;
+ TimerInfo
+ timer;
+
unsigned int
status;
@@ -234,6 +237,7 @@ static Image *ReadSFWImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -363,6 +367,8 @@ static Image *ReadSFWImage(const ImageInfo *image_info,ExceptionInfo *exception)
image=flipped_image;
}
}
+ StopTimer(&timer);
+ image->timer=timer;
return(image);
}
diff --git a/coders/sgi.c b/coders/sgi.c
index 2f01fc7..360b17f 100644
--- a/coders/sgi.c
+++ b/coders/sgi.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -659,7 +659,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
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,
@@ -781,7 +781,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
@@ -810,7 +810,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -850,7 +850,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
@@ -875,7 +875,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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;
@@ -917,6 +917,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
}
} while (0);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
@@ -1200,7 +1201,7 @@ static unsigned int WriteSGIImage(const ImageInfo *image_info,Image *image)
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);
/*
@@ -1211,7 +1212,7 @@ static unsigned int WriteSGIImage(const ImageInfo *image_info,Image *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);
@@ -1288,7 +1289,7 @@ static unsigned int WriteSGIImage(const ImageInfo *image_info,Image *image)
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.
diff --git a/coders/stegano.c b/coders/stegano.c
index 321bc5a..a52c879 100644
--- a/coders/stegano.c
+++ b/coders/stegano.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -137,6 +137,7 @@ static Image *ReadSTEGANOImage(const ImageInfo *image_info,
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
@@ -193,6 +194,7 @@ static Image *ReadSTEGANOImage(const ImageInfo *image_info,
}
DestroyImage(watermark);
(void) SyncImage(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/sun.c b/coders/sun.c
index 6a5f968..746b11e 100644
--- a/coders/sun.c
+++ b/coders/sun.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -721,6 +721,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/svg.c b/coders/svg.c
index c84dd3e..f7441ac 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -1097,7 +1097,7 @@ SVGStartElement(void *context,const xmlChar *name,
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,
@@ -3978,6 +3978,8 @@ ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
(void) memset(&svg_info,0xbf,sizeof(SVGInfo));
(void) LiberateTemporaryFile(filename);
+ if (image != (Image *) NULL)
+ StopTimer(&image->timer);
return(image);
}
#endif
diff --git a/coders/tga.c b/coders/tga.c
index 540c1d6..fb86fc1 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -368,7 +368,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
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);
@@ -625,6 +625,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
@@ -996,7 +997,7 @@ static unsigned int WriteTGAImage(const ImageInfo *image_info,Image *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);
}
diff --git a/coders/tiff.c b/coders/tiff.c
index 4a7118c..df0cbbc 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -94,6 +94,16 @@
# 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
@@ -2297,7 +2307,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
photometric == PHOTOMETRIC_MINISBLACK) &&
((image_info->type == PaletteType) ||
(image_info->type == PaletteMatteType)) &&
- (MaxColormapSize > MaxValueGivenBits(bits_per_sample))
+ (MaxColormapSize > MaxValueGivenBits(bits_per_sample))
)
)
{
@@ -2419,7 +2429,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
/*
QuantumTransferMode reported an error
- */
+ */
ThrowTIFFReaderException(CorruptImageError,ImproperImageHeader,image);
}
}
@@ -2614,9 +2624,9 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -2683,7 +2693,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
p=0;
strip_size=0;
strip_id=0;
- /*
+ /*
Allocate memory for one strip.
*/
strip_size_max=TIFFStripSize(tiff);
@@ -2721,7 +2731,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -2830,8 +2840,8 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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))
{
@@ -2972,7 +2982,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
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)
@@ -3165,7 +3175,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -3205,7 +3215,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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));
@@ -3373,8 +3383,8 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
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)
@@ -3400,7 +3410,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -3489,7 +3499,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
LiberateMagickResource(MemoryResource,pixels_size);
ThrowTIFFReaderException(ResourceLimitError,MemoryAllocationFailed,
- image);
+ image);
}
if (!TIFFReadRGBAImage(tiff,(uint32) image->columns,
(uint32) image->rows,
@@ -3565,6 +3575,7 @@ ReadTIFFImage(const ImageInfo *image_info,ExceptionInfo *exception)
read_next_frame:
if (status == MagickPass)
{
+ StopTimer(&image->timer);
if (image->depth > QuantumDepth)
image->depth=QuantumDepth;
if ((photometric == PHOTOMETRIC_LOGL) ||
@@ -4244,6 +4255,9 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
TIFF
*tiff = (TIFF *) NULL;
+ size_t
+ bytes_per_strip_target = TIFF_BYTES_PER_STRIP;
+
uint16
bits_per_sample,
compress_tag,
@@ -5085,47 +5099,25 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
(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)
@@ -5139,16 +5131,6 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
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.
@@ -5201,31 +5183,10 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
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)
@@ -5260,42 +5221,6 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
(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
@@ -5311,16 +5236,6 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
#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 */
@@ -5341,16 +5256,6 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
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.
@@ -5392,17 +5297,6 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
#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)
{
@@ -5425,7 +5319,7 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
{
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);
}
}
@@ -5438,12 +5332,87 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
}
}
+ 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);
@@ -5919,9 +5888,9 @@ WriteTIFFImage(const ImageInfo *image_info,Image *image)
}
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))
{
diff --git a/coders/tile.c b/coders/tile.c
index 5cb1c9e..9acd4da 100644
--- a/coders/tile.c
+++ b/coders/tile.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -87,6 +87,8 @@ static Image *ReadTILEImage(const ImageInfo *image_info,
RectangleInfo
geometry;
+ TimerInfo
+ timer;
/*
Initialize Image structure.
@@ -96,6 +98,7 @@ static Image *ReadTILEImage(const ImageInfo *image_info,
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
+ GetTimerInfo(&timer);
clone_info=CloneImageInfo(image_info);
clone_info->blob=(void *) NULL;
clone_info->length=0;
@@ -118,8 +121,13 @@ static Image *ReadTILEImage(const ImageInfo *image_info,
(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);
}
diff --git a/coders/tim.c b/coders/tim.c
index a250f2d..f71fe01 100644
--- a/coders/tim.c
+++ b/coders/tim.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -184,11 +184,11 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -319,7 +319,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -353,7 +353,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -391,7 +391,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -424,7 +424,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -449,6 +449,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
diff --git a/coders/topol.c b/coders/topol.c
index d8c3a15..32e9bf8 100644
--- a/coders/topol.c
+++ b/coders/topol.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -36,6 +36,7 @@
#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"
@@ -737,6 +738,7 @@ DONE_READING:
/* if (EOFBlob(image))
ThrowTOPOLReaderException(CorruptImageError,UnexpectedEndOfFile,image); */
CloseBlob(image);
+ StopTimer(&image->timer);
if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),"return");
return (image);
diff --git a/coders/ttf.c b/coders/ttf.c
index 9008f71..8673f43 100644
--- a/coders/ttf.c
+++ b/coders/ttf.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -249,6 +249,7 @@ static Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception)
DestroyDrawInfo(draw_info);
DrawDestroyContext(context);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif /* HasTTF */
diff --git a/coders/txt.c b/coders/txt.c
index 3c8ebd6..ef760ed 100644
--- a/coders/txt.c
+++ b/coders/txt.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -630,7 +630,7 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -650,8 +650,8 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -769,11 +769,11 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
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;
@@ -854,11 +854,11 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
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))
{
@@ -1034,6 +1034,8 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (p == (char *) NULL)
break;
+ StopTimer(&image->timer);
+
if (logging)
(void)LogMagickEvent(CoderEvent,GetMagickModule(),
"page %ld scene %ld ",page_num, image->scene);
diff --git a/coders/uyvy.c b/coders/uyvy.c
index c248599..fea01ea 100644
--- a/coders/uyvy.c
+++ b/coders/uyvy.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -136,6 +136,7 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
@@ -175,6 +176,7 @@ static Image *ReadUYVYImage(const ImageInfo *image_info,
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/vicar.c b/coders/vicar.c
index ff92c6c..8f27363 100644
--- a/coders/vicar.c
+++ b/coders/vicar.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -267,6 +267,7 @@ static Image *ReadVICARImage(const ImageInfo *image_info,
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (CheckImagePixelLimits(image, exception) != MagickPass)
@@ -300,6 +301,7 @@ static Image *ReadVICARImage(const ImageInfo *image_info,
if (EOFBlob(image))
ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/vid.c b/coders/vid.c
index a6f900d..a0caa9a 100644
--- a/coders/vid.c
+++ b/coders/vid.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -92,7 +92,8 @@ static unsigned int
MagickFreeMemory(filelist[i]); \
MagickFreeMemory(filelist); \
} \
- MagickFreeMemory(list[0]); \
+ if (list != (char **) NULL) \
+ MagickFreeMemory(list[0]); \
MagickFreeMemory(list); \
}
@@ -131,6 +132,9 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
RectangleInfo
geometry;
+ TimerInfo
+ timer;
+
register long
i;
@@ -144,6 +148,7 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
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 *));
@@ -241,6 +246,8 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
DestroyImageList(image);
LiberateVIDLists();
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"return");
+ StopTimer(&timer);
+ montage_image->timer=timer;
return(montage_image);
}
diff --git a/coders/viff.c b/coders/viff.c
index a1e3da8..5209a85 100644
--- a/coders/viff.c
+++ b/coders/viff.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -527,14 +527,14 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
{
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;
}
@@ -824,7 +824,7 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
/*
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);
@@ -871,6 +871,7 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
@@ -1220,10 +1221,10 @@ static unsigned int WriteVIFFImage(const ImageInfo *image_info,Image *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++;
}
@@ -1256,7 +1257,7 @@ static unsigned int WriteVIFFImage(const ImageInfo *image_info,Image *image)
*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.
diff --git a/coders/wbmp.c b/coders/wbmp.c
index 9cd5bff..98c5457 100644
--- a/coders/wbmp.c
+++ b/coders/wbmp.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -168,6 +168,7 @@ static Image *ReadWBMPImage(const ImageInfo *image_info,
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
/*
@@ -207,6 +208,7 @@ static Image *ReadWBMPImage(const ImageInfo *image_info,
ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
image->filename);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/webp.c b/coders/webp.c
index 04016e7..a008c57 100644
--- a/coders/webp.c
+++ b/coders/webp.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -252,6 +252,7 @@ static Image *ReadWEBPImage(const ImageInfo *image_info,
{
MagickFreeMemory(stream);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (CheckImagePixelLimits(image, exception) != MagickPass)
@@ -334,6 +335,7 @@ static Image *ReadWEBPImage(const ImageInfo *image_info,
pixels=(unsigned char *) NULL;
MagickFreeMemory(stream);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif
@@ -695,7 +697,7 @@ static unsigned int WriteWEBPImage(const ImageInfo *image_info,Image *image)
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;
diff --git a/coders/wmf.c b/coders/wmf.c
index c59904e..44daec9 100644
--- a/coders/wmf.c
+++ b/coders/wmf.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -2670,7 +2670,8 @@ static Image *ReadWMFImage(const ImageInfo * image_info, ExceptionInfo * excepti
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);
}
@@ -2742,6 +2743,7 @@ static Image *ReadWMFImage(const ImageInfo * image_info, ExceptionInfo * excepti
/* 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)
diff --git a/coders/wpg.c b/coders/wpg.c
index 58b5466..b8ce30c 100644
--- a/coders/wpg.c
+++ b/coders/wpg.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -416,12 +416,18 @@ return RetVal;
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++;
}
}
@@ -516,13 +522,12 @@ static int UnpackWPGRaster(Image *image,int bpp)
{ /* 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);
@@ -1428,6 +1433,8 @@ UnpackRaster:
}
}
+ StopTimer(&image->timer);
+
if (image_info->subrange != 0)
if (image->scene >= (image_info->subimage+image_info->subrange-1))
goto Finish;
@@ -1570,7 +1577,7 @@ UnpackRaster:
{
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++)
@@ -1634,6 +1641,8 @@ UnpackRaster:
Tx(2,2)=1; */
}
+ StopTimer(&image->timer);
+
if (image_info->subrange != 0)
if (image->scene >= (image_info->subimage+image_info->subrange-1))
goto Finish;
@@ -1653,7 +1662,7 @@ UnpackRaster:
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*/
diff --git a/coders/xbm.c b/coders/xbm.c
index b5cdf0b..0bb0fbe 100644
--- a/coders/xbm.c
+++ b/coders/xbm.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -288,6 +288,7 @@ static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (image_info->ping)
{
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
if (CheckImagePixelLimits(image, exception) != MagickPass)
@@ -298,7 +299,7 @@ static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *exception)
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);
@@ -396,6 +397,7 @@ static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *exception)
MagickFreeMemory(data);
(void) SyncImage(image);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/xc.c b/coders/xc.c
index bf2fe95..6cfec5a 100644
--- a/coders/xc.c
+++ b/coders/xc.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -104,6 +104,8 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception)
&image->background_color,exception);
if (status == MagickFail)
{
+ /* Promote warning to error */
+ exception->severity = OptionError;
DestroyImage(image);
return ((Image *) NULL);
}
@@ -126,6 +128,10 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception)
DestroyImage(image);
image=(Image *) NULL;
}
+ else
+ {
+ StopTimer(&image->timer);
+ }
return image;
}
diff --git a/coders/xcf.c b/coders/xcf.c
index 71260bf..d08839a 100644
--- a/coders/xcf.c
+++ b/coders/xcf.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -336,12 +336,12 @@ static MagickPassFail load_tile (Image* image, Image* tile_image, XCFDocInfo* 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))
@@ -469,7 +469,7 @@ static MagickPassFail load_tile_rle (Image* image,
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)
@@ -817,7 +817,7 @@ static MagickPassFail load_level (Image* image,
/*
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
{
@@ -827,7 +827,7 @@ static MagickPassFail load_level (Image* image,
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(),
@@ -1982,6 +1982,7 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
CloseBlob(image);
if ( image_type == GIMP_GRAY )
image->is_grayscale=MagickTrue;
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/xpm.c b/coders/xpm.c
index c7d352b..c09aa05 100644
--- a/coders/xpm.c
+++ b/coders/xpm.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -270,9 +270,12 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
register long
i;
- unsigned int
+ MagickPassFail
status;
+ MagickBool
+ colormap_initialized;
+
size_t
length;
@@ -415,6 +418,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
none=(~0U);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"Parsing colormap...");
+ colormap_initialized=MagickFalse;
for (j=0; j < image->colors; j++)
{
p=textlist[i++];
@@ -425,7 +429,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
" %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';
@@ -453,9 +457,16 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
(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);
@@ -525,6 +536,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
MagickFreeMemory(textlist);
MagickFreeMemory(xpm_buffer);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/coders/xwd.c b/coders/xwd.c
index e8eff5f..4177c37 100644
--- a/coders/xwd.c
+++ b/coders/xwd.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -833,6 +833,7 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
MagickFreeMemory(ximage->data);
MagickFreeMemory(ximage);
CloseBlob(image);
+ StopTimer(&image->timer);
return(image);
}
#endif
diff --git a/coders/yuv.c b/coders/yuv.c
index 9c5ac55..e754588 100644
--- a/coders/yuv.c
+++ b/coders/yuv.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -184,7 +184,7 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -213,7 +213,7 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
@@ -397,6 +397,7 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
image->filename);
break;
}
+ StopTimer(&image->timer);
/*
Proceed to next image.
*/
@@ -404,7 +405,7 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception)
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)
diff --git a/configure b/configure
index 9581a4e..6d0be45 100755
--- a/configure
+++ b/configure
@@ -20026,118 +20026,6 @@ fi
# 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`
@@ -20298,7 +20186,7 @@ fi
# 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"
@@ -28360,7 +28248,7 @@ rm -f conftest.mmap
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 \
diff --git a/configure.ac b/configure.ac
index 6d77a20..8b512ec 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# 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
#
@@ -915,11 +915,10 @@ AC_SUBST(MODULE_EXTRA_CPPFLAGS)
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
@@ -2768,7 +2767,7 @@ AC_SUBST([LIB_WMF_DEPS])
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 \
diff --git a/locale/C.mgk b/locale/C.mgk
index 7995d24..b7ebf44 100644
--- a/locale/C.mgk
+++ b/locale/C.mgk
@@ -343,7 +343,7 @@
Unsupported number of columns
</Message>
<Message name="UnsupportedNumberOfRows">
- Unsupported number of columns
+ Unsupported number of rows
</Message>
<Message name="ArithmeticOverflow">
Arithmetic overflow
diff --git a/magick/Makefile.am b/magick/Makefile.am
index a3f369f..487fda6 100644
--- a/magick/Makefile.am
+++ b/magick/Makefile.am
@@ -1,4 +1,4 @@
-# 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
@@ -289,24 +289,43 @@ MAGICK_INCLUDE_HDRS = \
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
diff --git a/magick/analyze.h b/magick/analyze.h
index 1b22acd..d237939 100644
--- a/magick/analyze.h
+++ b/magick/analyze.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -46,11 +46,6 @@ extern MagickExport ImageType
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) */
diff --git a/magick/annotate.c b/magick/annotate.c
index 1ed9174..6dce70f 100644
--- a/magick/annotate.c
+++ b/magick/annotate.c
@@ -184,7 +184,7 @@ MagickExport MagickPassFail AnnotateImage(Image *image,const DrawInfo *draw_info
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);
@@ -232,84 +232,84 @@ MagickExport MagickPassFail AnnotateImage(Image *image,const DrawInfo *draw_info
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;
}
}
@@ -1445,7 +1445,7 @@ static MagickPassFail RenderFreetype(Image *image,const DrawInfo *draw_info,
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);
}
diff --git a/magick/attribute-private.h b/magick/attribute-private.h
new file mode 100644
index 0000000..8ef833a
--- /dev/null
+++ b/magick/attribute-private.h
@@ -0,0 +1,30 @@
+/*
+ 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:
+ */
diff --git a/magick/attribute.c b/magick/attribute.c
index a8bb8fc..791a7d9 100644
--- a/magick/attribute.c
+++ b/magick/attribute.c
@@ -346,8 +346,8 @@ GenerateIPTCAttribute(Image *image,const char *key)
/* 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;
@@ -1879,7 +1879,7 @@ GenerateEXIFAttribute(Image *image,const char *specification)
*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));
@@ -2959,7 +2959,7 @@ FindEXIFAttribute(const unsigned char *profile_info,
*pval;
- pde=(unsigned char *) (ifdp+2+(12*de));
+ pde=(unsigned char *) (ifdp+2+(12*(size_t) de));
if (pde + 12 > tiffp + length)
{
if (debug)
diff --git a/magick/attribute.h b/magick/attribute.h
index b0d8393..75679db 100644
--- a/magick/attribute.h
+++ b/magick/attribute.h
@@ -47,19 +47,7 @@ extern MagickExport void
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)
diff --git a/magick/blob.c b/magick/blob.c
index 56028ed..b517d6c 100644
--- a/magick/blob.c
+++ b/magick/blob.c
@@ -1946,7 +1946,7 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
const char
*separator;
- int
+ size_t
string_length;
separator = strchr(start,DirectoryListSeparator);
@@ -2956,7 +2956,8 @@ MagickExport MagickPassFail OpenBlob(const ImageInfo *image_info,Image *image,
#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)
{
diff --git a/magick/color-private.h b/magick/color-private.h
new file mode 100644
index 0000000..90af10b
--- /dev/null
+++ b/magick/color-private.h
@@ -0,0 +1,60 @@
+/*
+ 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:
+ */
diff --git a/magick/color.c b/magick/color.c
index 1dff591..b955006 100644
--- a/magick/color.c
+++ b/magick/color.c
@@ -233,7 +233,7 @@ ComputeCubeInfo(const Image *image,ExceptionInfo *exception)
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);
@@ -933,7 +933,7 @@ MagickExport MagickBool IsPaletteImage(const Image *image,
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,
diff --git a/magick/color.h b/magick/color.h
index 27654c1..695a069 100644
--- a/magick/color.h
+++ b/magick/color.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -42,50 +42,7 @@ extern MagickExport MagickBool
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)
diff --git a/magick/color_lookup-private.h b/magick/color_lookup-private.h
new file mode 100644
index 0000000..8985d4c
--- /dev/null
+++ b/magick/color_lookup-private.h
@@ -0,0 +1,59 @@
+/*
+ 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:
+ */
diff --git a/magick/color_lookup.h b/magick/color_lookup.h
index 9302be5..83f181a 100644
--- a/magick/color_lookup.h
+++ b/magick/color_lookup.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -37,48 +37,7 @@ extern MagickExport unsigned int
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)
diff --git a/magick/colormap-private.h b/magick/colormap-private.h
new file mode 100644
index 0000000..62a7e7b
--- /dev/null
+++ b/magick/colormap-private.h
@@ -0,0 +1,47 @@
+/*
+ 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:
+ */
diff --git a/magick/colormap.h b/magick/colormap.h
index 1c58657..6166ac0 100644
--- a/magick/colormap.h
+++ b/magick/colormap.h
@@ -31,35 +31,7 @@ extern MagickExport MagickPassFail
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)
diff --git a/magick/command-private.h b/magick/command-private.h
new file mode 100644
index 0000000..4835bc7
--- /dev/null
+++ b/magick/command-private.h
@@ -0,0 +1,24 @@
+/*
+ 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:
+ */
diff --git a/magick/command.c b/magick/command.c
index 210954b..96a8285 100644
--- a/magick/command.c
+++ b/magick/command.c
@@ -9419,7 +9419,7 @@ MagickExport MagickPassFail MogrifyImage(const ImageInfo *image_info,
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));
@@ -10542,7 +10542,7 @@ MagickExport MagickPassFail MogrifyImage(const ImageInfo *image_info,
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));
@@ -16870,9 +16870,9 @@ static void PrintFeatureTextual(const char* feature,MagickBool support,const cha
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)
{
@@ -17006,6 +17006,13 @@ static MagickPassFail VersionCommand(ImageInfo *image_info,
#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';
diff --git a/magick/command.h b/magick/command.h
index cd032b9..3064e8d 100644
--- a/magick/command.h
+++ b/magick/command.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -49,13 +49,7 @@ extern MagickExport int
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)
diff --git a/magick/common.h b/magick/common.h
index 98392fb..1fc2e94 100644
--- a/magick/common.h
+++ b/magick/common.h
@@ -262,6 +262,12 @@ extern "C" {
#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
@@ -274,18 +280,18 @@ extern "C" {
#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
diff --git a/magick/composite.c b/magick/composite.c
index 38414de..1e25014 100644
--- a/magick/composite.c
+++ b/magick/composite.c
@@ -3299,7 +3299,7 @@ CompositeImage(Image *canvas_image,
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;
diff --git a/magick/compress.c b/magick/compress.c
index 742824d..500c6b8 100644
--- a/magick/compress.c
+++ b/magick/compress.c
@@ -276,7 +276,7 @@ MagickExport void Ascii85Flush(Image *image)
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,'~');
@@ -762,7 +762,7 @@ MagickExport MagickPassFail HuffmanEncode2Image(const ImageInfo *image_info,
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);
@@ -827,7 +827,7 @@ MagickExport MagickPassFail HuffmanEncode2Image(const ImageInfo *image_info,
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;
@@ -847,7 +847,7 @@ MagickExport MagickPassFail HuffmanEncode2Image(const ImageInfo *image_info,
}
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;
diff --git a/magick/constitute-private.h b/magick/constitute-private.h
new file mode 100644
index 0000000..270e95d
--- /dev/null
+++ b/magick/constitute-private.h
@@ -0,0 +1,24 @@
+/*
+ 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:
+ */
diff --git a/magick/constitute.c b/magick/constitute.c
index 9fa689f..106d73a 100644
--- a/magick/constitute.c
+++ b/magick/constitute.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -2142,7 +2142,8 @@ WriteImage(const ImageInfo *image_info,Image *image)
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);
diff --git a/magick/constitute.h b/magick/constitute.h
index 390835b..250b807 100644
--- a/magick/constitute.h
+++ b/magick/constitute.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -192,13 +192,7 @@ extern MagickExport unsigned int
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)
diff --git a/magick/delegate-private.h b/magick/delegate-private.h
new file mode 100644
index 0000000..c6be1c1
--- /dev/null
+++ b/magick/delegate-private.h
@@ -0,0 +1,132 @@
+/*
+ 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:
+ */
diff --git a/magick/describe.c b/magick/describe.c
index 3061f28..d8ea664 100644
--- a/magick/describe.c
+++ b/magick/describe.c
@@ -731,8 +731,8 @@ MagickExport MagickPassFail DescribeImage(Image *image,FILE *file,
}
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)
diff --git a/magick/draw.c b/magick/draw.c
index 6928dd5..b4af40f 100644
--- a/magick/draw.c
+++ b/magick/draw.c
@@ -4087,7 +4087,7 @@ MagickExport void DrawPushGraphicContext(DrawContext context)
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--;
@@ -4814,7 +4814,7 @@ MagickExport double *DrawGetStrokeDashArray(DrawContext context,
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;
@@ -4924,7 +4924,7 @@ MagickExport void DrawSetStrokeDashArray(DrawContext context,
if( n_new != 0 )
{
CurrentContext->dash_pattern = MagickAllocateArray(double *,
- (n_new+1),
+ ((size_t) n_new+1),
sizeof(double));
if(CurrentContext->dash_pattern)
{
diff --git a/magick/effect.c b/magick/effect.c
index fbc2b35..73f1da0 100644
--- a/magick/effect.c
+++ b/magick/effect.c
@@ -50,7 +50,6 @@
#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"
@@ -726,7 +725,7 @@ BlurScanline(const double * restrict kernel,const unsigned long width,
{
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;
@@ -748,7 +747,7 @@ BlurScanline(const double * restrict kernel,const unsigned long width,
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;
@@ -1359,7 +1358,7 @@ MagickExport Image *ConvolveImage(const Image * restrict image,const unsigned in
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);
@@ -1506,7 +1505,7 @@ MagickExport Image *ConvolveImage(const Image * restrict image,const unsigned in
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;
@@ -1523,7 +1522,7 @@ MagickExport Image *ConvolveImage(const Image * restrict image,const unsigned in
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);
@@ -1543,7 +1542,7 @@ MagickExport Image *ConvolveImage(const Image * restrict image,const unsigned in
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);
@@ -1691,7 +1690,7 @@ MagickExport Image *DespeckleImage(const Image *image,ExceptionInfo *exception)
/*
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
@@ -1926,13 +1925,13 @@ MagickExport Image *EdgeImage(const Image *image,const double radius,
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;
@@ -1996,7 +1995,7 @@ MagickExport Image *EmbossImage(const Image *image,const double radius,
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);
@@ -2006,7 +2005,7 @@ MagickExport Image *EmbossImage(const Image *image,const double radius,
{
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)
@@ -2165,8 +2164,8 @@ MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
/*
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++)
{
/*
@@ -2174,14 +2173,14 @@ MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
*/
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;
@@ -2318,16 +2317,16 @@ MagickExport Image *GaussianBlurImage(const Image *image,const double radius,
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++;
}
@@ -2789,7 +2788,7 @@ MagickExport Image *MedianFilterImage(const Image *image,const double radius,
{
for (u=0; u < width; u++)
InsertMedianList(skiplist,&r[u]);
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
GetMedianList(skiplist,&q[x]);
}
@@ -2960,7 +2959,7 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
/*
Allocate and initialize offsets.
*/
- offsets=MagickAllocateMemory(BlurOffsetInfo *,width*sizeof(BlurOffsetInfo));
+ offsets=MagickAllocateArray(BlurOffsetInfo *,width,sizeof(BlurOffsetInfo));
if (offsets == (BlurOffsetInfo *) NULL)
{
MagickFreeMemory(kernel);
@@ -2971,8 +2970,8 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
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);
}
}
/*
@@ -3823,7 +3822,7 @@ MagickExport Image *ReduceNoiseImage(const Image *image,const double radius,
{
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++;
@@ -4138,7 +4137,7 @@ MagickExport Image *SharpenImage(const Image *image,const double radius,
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);
@@ -4148,7 +4147,7 @@ MagickExport Image *SharpenImage(const Image *image,const double radius,
{
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++;
@@ -4397,7 +4396,7 @@ MagickExport Image *SpreadImage(const Image *image,const unsigned int radius,
}
} 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))
diff --git a/magick/enhance.c b/magick/enhance.c
index 1a1febd..3b7664e 100644
--- a/magick/enhance.c
+++ b/magick/enhance.c
@@ -1151,7 +1151,7 @@ MagickExport MagickPassFail ModulateImage(Image *image,const char *modulate)
(void) ModulateImagePixels(NULL,&param,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);
}
diff --git a/magick/enum_strings.c b/magick/enum_strings.c
index 3aa7f05..8f7a31c 100644
--- a/magick/enum_strings.c
+++ b/magick/enum_strings.c
@@ -785,6 +785,50 @@ MagickExport FilterTypes StringToFilterTypes(const char *option)
/*
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
diff --git a/magick/enum_strings.h b/magick/enum_strings.h
index 3d6d6f4..4e3d271 100644
--- a/magick/enum_strings.h
+++ b/magick/enum_strings.h
@@ -54,6 +54,7 @@ extern "C" {
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;
diff --git a/magick/error-private.h b/magick/error-private.h
new file mode 100644
index 0000000..fc68001
--- /dev/null
+++ b/magick/error-private.h
@@ -0,0 +1,218 @@
+/*
+ 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:
+ */
diff --git a/magick/error.h b/magick/error.h
index 0f3a159..22957f2 100644
--- a/magick/error.h
+++ b/magick/error.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -7,7 +7,7 @@
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
@@ -232,7 +232,7 @@ typedef void
(*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 *);
@@ -278,198 +278,7 @@ extern MagickExport WarningHandler
#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) */
diff --git a/magick/fx.c b/magick/fx.c
index 4d17609..d4d27c8 100644
--- a/magick/fx.c
+++ b/magick/fx.c
@@ -1139,7 +1139,7 @@ MagickExport Image *OilPaintImage(const Image *image,const double radius,
}
ru++;
}
- r+=image->columns+width;
+ r+=(size_t) image->columns+width;
}
*q++=(*s);
}
diff --git a/magick/gem.c b/magick/gem.c
index dc8d1c2..42755d7 100644
--- a/magick/gem.c
+++ b/magick/gem.c
@@ -37,7 +37,7 @@
*/
#include "magick/studio.h"
#include "magick/gem.h"
-#include "magick/random-private.h"
+#include "magick/random.h"
#include "magick/utility.h"
/*
@@ -420,7 +420,7 @@ MagickExport int GetOptimalKernelWidth2D(const double radius,const double sigma)
{
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);
}
}
@@ -670,9 +670,9 @@ MagickExport void Hull(const long x_offset,const long y_offset,
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)
@@ -719,10 +719,10 @@ MagickExport void Hull(const long x_offset,const long y_offset,
}
}
}
- 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)
diff --git a/magick/gradient.c b/magick/gradient.c
index b0f44c3..1bf98ce 100644
--- a/magick/gradient.c
+++ b/magick/gradient.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -17,7 +17,9 @@
#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"
@@ -31,8 +33,31 @@
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% 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.
@@ -59,9 +84,19 @@ MagickExport MagickPassFail GradientImage(Image *restrict image,
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;
@@ -69,15 +104,16 @@ MagickExport MagickPassFail GradientImage(Image *restrict image,
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);
@@ -86,60 +122,234 @@ MagickExport MagickPassFail GradientImage(Image *restrict image,
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)
{
@@ -153,5 +363,6 @@ MagickExport MagickPassFail GradientImage(Image *restrict image,
image->is_grayscale=MagickTrue;
if (IsMonochrome(*start_color) && ColorMatch(start_color,stop_color))
image->is_monochrome=MagickTrue;
+ MagickFreeMemory(pixel_packets);
return(status);
}
diff --git a/magick/image-private.h b/magick/image-private.h
index 2423bee..b8bae5a 100644
--- a/magick/image-private.h
+++ b/magick/image-private.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -24,3 +24,11 @@ typedef struct _ImageExtra
#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:
+ */
diff --git a/magick/image.c b/magick/image.c
index 085909b..5cbb5d3 100644
--- a/magick/image.c
+++ b/magick/image.c
@@ -73,30 +73,12 @@
#include "magick/utility.h"
#include "magick/xwindow.h"
-/*
- 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);
-
+
/* provide public access to the clip_mask member of Image */
MagickExport Image **
ImageGetClipMask(const Image * image)
@@ -1534,12 +1516,12 @@ MagickExport void DestroyImageInfo(ImageInfo *image_info)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 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:
%
@@ -1604,7 +1586,7 @@ MagickExport MagickPassFail DisplayImages(const ImageInfo *image_info,
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,
diff --git a/magick/list.c b/magick/list.c
index 20eb9d9..7be5fee 100644
--- a/magick/list.c
+++ b/magick/list.c
@@ -532,7 +532,7 @@ MagickExport Image **ImageListToArray(const Image *images,
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,
diff --git a/magick/locale_c.h b/magick/locale_c.h
index 14843ee..1110449 100644
--- a/magick/locale_c.h
+++ b/magick/locale_c.h
@@ -1384,7 +1384,7 @@ static const char message_dat[] =
"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"
@@ -1973,494 +1973,494 @@ static const unsigned short message_dat_offsets[] =
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_) */
diff --git a/magick/log-private.h b/magick/log-private.h
new file mode 100644
index 0000000..f5ed2ea
--- /dev/null
+++ b/magick/log-private.h
@@ -0,0 +1,27 @@
+/*
+ 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:
+ */
diff --git a/magick/log.c b/magick/log.c
index 0069c3e..5a9292c 100644
--- a/magick/log.c
+++ b/magick/log.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -488,6 +488,9 @@ MagickExport unsigned int LogMagickEventList(const ExceptionType type,
*p;
struct tm
+#if defined(HAVE_LOCALTIME_R)
+ tm_buf,
+#endif /* if defined(HAVE_LOCALTIME_R) */
*time_meridian;
time_t
@@ -613,7 +616,11 @@ MagickExport unsigned int LogMagickEventList(const ExceptionType type,
# 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);
diff --git a/magick/log.h b/magick/log.h
index 357f7ac..2801f5e 100644
--- a/magick/log.h
+++ b/magick/log.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -94,16 +94,7 @@ extern MagickExport void
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)
diff --git a/magick/magic-private.h b/magick/magic-private.h
new file mode 100644
index 0000000..cbc6c7d
--- /dev/null
+++ b/magick/magic-private.h
@@ -0,0 +1,24 @@
+/*
+ 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:
+ */
diff --git a/magick/magic.c b/magick/magic.c
index 66998e4..096ffbb 100644
--- a/magick/magic.c
+++ b/magick/magic.c
@@ -251,7 +251,7 @@ GetMagickFileFormat(const unsigned char *header, const size_t header_length,
*/
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,
diff --git a/magick/magic.h b/magick/magic.h
index 9fcec14..ca72feb 100644
--- a/magick/magic.h
+++ b/magick/magic.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -24,13 +24,7 @@ extern MagickExport MagickPassFail
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)
diff --git a/magick/magick-private.h b/magick/magick-private.h
new file mode 100644
index 0000000..446ac90
--- /dev/null
+++ b/magick/magick-private.h
@@ -0,0 +1,31 @@
+/*
+ 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:
+ */
diff --git a/magick/magick.c b/magick/magick.c
index 3411756..00988c6 100644
--- a/magick/magick.c
+++ b/magick/magick.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -86,6 +86,8 @@ static SemaphoreInfo
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;
@@ -564,20 +566,26 @@ GetMagickInfoArray(ExceptionInfo *exception)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 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)
%
%
*/
@@ -926,7 +934,7 @@ IsValidFilesystemPath(const char *path)
/*
Try and figure out the path and name of the client
*/
-MagickExport void
+static void
InitializeMagickClientPathAndName(const char *path)
{
#if !defined(UseInstalledMagick)
@@ -1007,7 +1015,7 @@ InitializeMagickClientPathAndName(const char *path)
Establish signal handlers for common signals
*/
-MagickExport void
+static void
InitializeMagickSignalHandlers(void)
{
#if 0
@@ -1049,19 +1057,76 @@ InitializeMagickSignalHandlers(void)
#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
@@ -1074,6 +1139,11 @@ InitializeMagick(const char *path)
const char
*p;
+ MagickPassFail
+ status = MagickPass;
+
+ (void) exception;
+
/* Acquire initialization lock */
SPINLOCK_WAIT;
@@ -1081,9 +1151,12 @@ InitializeMagick(const char *path)
{
/* 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__)
{
@@ -1173,7 +1246,8 @@ InitializeMagick(const char *path)
#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 */
@@ -1196,6 +1270,8 @@ InitializeMagick(const char *path)
/* Release initialization lock */
SPINLOCK_RELEASE;
+
+ return status;
}
/*
@@ -1217,7 +1293,7 @@ InitializeMagick(const char *path)
%
%
*/
-MagickPassFail
+static MagickPassFail
InitializeMagickInfoList(void)
{
assert(magick_semaphore == (SemaphoreInfo *) NULL);
@@ -1480,6 +1556,7 @@ MagickToMime(const char *magick)
{ "gif", "image/gif" },
{ "gif87", "image/gif" },
{ "jpeg", "image/jpeg" },
+ { "jpg", "image/jpeg" },
{ "mng", "video/x-mng" },
{ "mpeg", "video/mpeg" },
{ "png", "image/png" },
@@ -1684,11 +1761,10 @@ SetMagickInfo(const char *name)
*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;
diff --git a/magick/magick.h b/magick/magick.h
index 33bdee7..cc5e0e7 100644
--- a/magick/magick.h
+++ b/magick/magick.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -16,6 +16,11 @@
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 *);
@@ -112,6 +117,8 @@ extern MagickExport MagickBool
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
@@ -130,19 +137,7 @@ extern MagickExport MagickInfo
*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) */
diff --git a/magick/magick_config.h.in b/magick/magick_config.h.in
index 691674a..2a37080 100644
--- a/magick/magick_config.h.in
+++ b/magick/magick_config.h.in
@@ -134,6 +134,9 @@
/* 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
diff --git a/magick/magick_types.h b/magick/magick_types.h
index cab7550..30df6a0 100644
--- a/magick/magick_types.h
+++ b/magick/magick_types.h
@@ -1,10 +1,10 @@
/*
- 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
@@ -24,7 +24,7 @@ extern "C" {
#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
@@ -40,13 +40,13 @@ extern "C" {
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
*/
diff --git a/magick/magick_types.h.in b/magick/magick_types.h.in
index 1f24a58..7982b5d 100644
--- a/magick/magick_types.h.in
+++ b/magick/magick_types.h.in
@@ -1,10 +1,10 @@
/*
- 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
@@ -24,7 +24,7 @@ extern "C" {
#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
@@ -40,13 +40,13 @@ extern "C" {
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
*/
diff --git a/magick/memory-private.h b/magick/memory-private.h
new file mode 100644
index 0000000..3bb9f15
--- /dev/null
+++ b/magick/memory-private.h
@@ -0,0 +1,89 @@
+/*
+ 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:
+ */
diff --git a/magick/memory.h b/magick/memory.h
index 66f1872..3349b0b 100644
--- a/magick/memory.h
+++ b/magick/memory.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -30,80 +30,7 @@ extern MagickExport void
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)
diff --git a/magick/module-private.h b/magick/module-private.h
new file mode 100644
index 0000000..8500265
--- /dev/null
+++ b/magick/module-private.h
@@ -0,0 +1,58 @@
+/*
+ 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:
+ */
diff --git a/magick/module.c b/magick/module.c
index 4f1a719..0c5d666 100644
--- a/magick/module.c
+++ b/magick/module.c
@@ -752,7 +752,7 @@ GetModuleList(ExceptionInfo *exception)
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;
@@ -957,7 +957,7 @@ InitializeModuleSearchPath(MagickModuleType module_type,
const char
*seperator;
- int
+ size_t
length;
MagickBool
@@ -1707,11 +1707,10 @@ ReadModuleConfigureFile(const char *basename,
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)
@@ -1929,11 +1928,10 @@ SetCoderInfo(const char *tag)
*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);
diff --git a/magick/module.h b/magick/module.h
index 5a2c9ea..ba2572a 100644
--- a/magick/module.h
+++ b/magick/module.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -25,47 +25,7 @@ extern MagickExport MagickPassFail
#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) */
diff --git a/magick/monitor-private.h b/magick/monitor-private.h
new file mode 100644
index 0000000..03b0a0e
--- /dev/null
+++ b/magick/monitor-private.h
@@ -0,0 +1,28 @@
+/*
+ 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:
+ */
diff --git a/magick/monitor.h b/magick/monitor.h
index 3bd0fd0..94e916a 100644
--- a/magick/monitor.h
+++ b/magick/monitor.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -22,7 +22,7 @@ extern "C" {
typedef MagickPassFail
(*MonitorHandler)(const char *text,const magick_int64_t quantum,
const magick_uint64_t span,ExceptionInfo *exception);
-
+
/*
Monitor declarations.
*/
@@ -41,16 +41,7 @@ extern "C" {
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)
diff --git a/magick/montage.c b/magick/montage.c
index 405920e..76c6389 100644
--- a/magick/montage.c
+++ b/magick/montage.c
@@ -494,8 +494,8 @@ MagickExport Image *MontageImages(const Image *images,
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++)
{
diff --git a/magick/nt_base.c b/magick/nt_base.c
index 678e2a4..41f23c7 100644
--- a/magick/nt_base.c
+++ b/magick/nt_base.c
@@ -2093,7 +2093,7 @@ MagickExport unsigned char *NTResourceToBlob(const char *id)
{
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);
diff --git a/magick/nt_base.h b/magick/nt_base.h
index f0a5d54..85f9bc9 100644
--- a/magick/nt_base.h
+++ b/magick/nt_base.h
@@ -342,10 +342,8 @@ extern MagickExport int
NTGhostscriptLoadDLL(void),
NTGhostscriptUnLoadDLL(void);
-#if defined(MAGICK_IMPLEMENTATION)
extern MagickExport const GhostscriptVectors
*NTGhostscriptDLLVectors( void );
-#endif /* defined(MAGICK_IMPLEMENTATION) */
/*
Directory access functions
diff --git a/magick/nt_feature.c b/magick/nt_feature.c
index 2fda4a0..315476c 100644
--- a/magick/nt_feature.c
+++ b/magick/nt_feature.c
@@ -152,7 +152,7 @@ MagickExport void *CropImageToHBITMAP(Image *image,
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 );
diff --git a/magick/operator.c b/magick/operator.c
index eabb8e4..5653741 100644
--- a/magick/operator.c
+++ b/magick/operator.c
@@ -17,7 +17,6 @@
#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"
diff --git a/magick/paint.c b/magick/paint.c
index ea4c8b3..f9af5a5 100644
--- a/magick/paint.c
+++ b/magick/paint.c
@@ -49,10 +49,11 @@
#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); \
@@ -159,8 +160,8 @@ MagickExport MagickPassFail ColorFloodfillImage(Image *image,
*/
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))
{
@@ -169,7 +170,6 @@ MagickExport MagickPassFail ColorFloodfillImage(Image *image,
ThrowBinaryException3(ResourceLimitError,MemoryAllocationFailed,
UnableToFloodfillImage);
}
- (void) memset(floodplane,False,image->columns*image->rows);
/*
Push initial segment on stack.
*/
@@ -179,7 +179,7 @@ MagickExport MagickPassFail ColorFloodfillImage(Image *image,
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)
{
/*
@@ -225,7 +225,7 @@ MagickExport MagickPassFail ColorFloodfillImage(Image *image,
{
start=x+1;
if (start < x1)
- Push(y,start,x1-1,-offset);
+ Push(y,start,(ptrdiff_t)x1-1,-offset);
x=x1+1;
}
do
@@ -261,9 +261,9 @@ MagickExport MagickPassFail ColorFloodfillImage(Image *image,
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++;
@@ -462,7 +462,7 @@ MagickExport MagickPassFail MatteFloodfillImage(Image *image,
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)
{
/*
@@ -506,7 +506,7 @@ MagickExport MagickPassFail MatteFloodfillImage(Image *image,
{
start=x+1;
if (start < x1)
- Push(y,start,x1-1,-offset);
+ Push(y,start, (ptrdiff_t)x1-1,-offset);
x=x1+1;
}
do
@@ -539,9 +539,9 @@ MagickExport MagickPassFail MatteFloodfillImage(Image *image,
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);
diff --git a/magick/pixel_cache.c b/magick/pixel_cache.c
index b1fefcf..71c16a9 100644
--- a/magick/pixel_cache.c
+++ b/magick/pixel_cache.c
@@ -470,12 +470,18 @@ DestroyThreadViewSet(ThreadViewSet *view_set)
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);
}
}
@@ -1838,7 +1844,7 @@ AcquireCacheNexus(const Image *image,const long x,const long y,
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) &&
@@ -3210,7 +3216,7 @@ CheckImagePixelLimits(const Image *image, ExceptionInfo *exception)
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)
{
@@ -4580,7 +4586,9 @@ ModifyCache(Image *image, ExceptionInfo *exception)
*/
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)));
}
}
diff --git a/magick/quantize.c b/magick/quantize.c
index f71b994..de3327d 100644
--- a/magick/quantize.c
+++ b/magick/quantize.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -351,31 +351,10 @@ static MagickPassFail AssignImageColors(CubeInfo *cube_info,Image *image)
{
#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;
@@ -387,7 +366,7 @@ static MagickPassFail AssignImageColors(CubeInfo *cube_info,Image *image)
*/
if (!AllocateImageColormap(image,cube_info->colors))
ThrowBinaryException3(ResourceLimitError,MemoryAllocationFailed,
- UnableToQuantizeImage);
+ UnableToQuantizeImage);
image->colors=0;
is_grayscale=image->is_grayscale;
is_monochrome=image->is_monochrome;
@@ -401,86 +380,122 @@ static MagickPassFail AssignImageColors(CubeInfo *cube_info,Image *image)
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);
@@ -616,10 +631,10 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *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++)
{
@@ -635,8 +650,12 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *image
*/
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++;
}
@@ -652,6 +671,8 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *image
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.
*/
@@ -669,8 +690,8 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *image
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.
*/
@@ -700,14 +721,14 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *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 <= 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;
@@ -719,8 +740,12 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *image
*/
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++;
}
@@ -736,6 +761,8 @@ static MagickPassFail ClassifyImageColors(CubeInfo *cube_info,const Image *image
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.
*/
@@ -817,6 +844,8 @@ MagickExport QuantizeInfo *CloneQuantizeInfo(const QuantizeInfo *quantize_info)
% 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,
@@ -1158,7 +1187,7 @@ static MagickPassFail Dither(CubeInfo *cube_info,Image *image,
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;
}
@@ -1344,7 +1373,7 @@ static CubeInfo *GetCubeInfo(const QuantizeInfo *quantize_info,
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.
@@ -1539,7 +1568,7 @@ MagickExport MagickPassFail GetImageQuantizeError(Image *image)
/*
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;
@@ -1857,6 +1886,8 @@ MagickExport void GrayscalePseudoClassImage(Image *image,
% 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,
@@ -2173,21 +2204,9 @@ MagickExport MagickPassFail OrderedDitherImage(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;
@@ -2200,9 +2219,22 @@ MagickExport MagickPassFail OrderedDitherImage(Image *image)
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)
{
@@ -2250,6 +2282,8 @@ MagickExport MagickPassFail OrderedDitherImage(Image *image)
% 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)
@@ -2302,6 +2336,8 @@ static void 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)
@@ -2344,6 +2380,8 @@ static void 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)
@@ -2647,6 +2685,8 @@ MagickExport MagickPassFail QuantizeImages(const QuantizeInfo *quantize_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)
@@ -2766,7 +2806,7 @@ static void ReduceImageColors(const char *filename,CubeInfo *cube_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);
diff --git a/magick/random-private.h b/magick/random-private.h
index db60000..a332074 100644
--- a/magick/random-private.h
+++ b/magick/random-private.h
@@ -10,64 +10,67 @@
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:
diff --git a/magick/random.c b/magick/random.c
index 819e8f9..2716442 100644
--- a/magick/random.c
+++ b/magick/random.c
@@ -13,7 +13,6 @@
*/
#include "magick/studio.h"
-#include "magick/random-private.h"
#include "magick/random.h"
#include "magick/semaphore.h"
#include "magick/tsd.h"
diff --git a/magick/random.h b/magick/random.h
index a87e969..edd7fb1 100644
--- a/magick/random.h
+++ b/magick/random.h
@@ -37,28 +37,7 @@ typedef struct _MagickRandomKernel
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)
diff --git a/magick/registry-private.h b/magick/registry-private.h
new file mode 100644
index 0000000..61488a5
--- /dev/null
+++ b/magick/registry-private.h
@@ -0,0 +1,22 @@
+/*
+ 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:
+ */
diff --git a/magick/registry.h b/magick/registry.h
index c67398c..94733b4 100644
--- a/magick/registry.h
+++ b/magick/registry.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -44,11 +44,7 @@ extern MagickExport void
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)
diff --git a/magick/render-private.h b/magick/render-private.h
new file mode 100644
index 0000000..0c3019e
--- /dev/null
+++ b/magick/render-private.h
@@ -0,0 +1,60 @@
+/*
+ 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:
+ */
diff --git a/magick/render.c b/magick/render.c
index 1f334c5..70ffe44 100644
--- a/magick/render.c
+++ b/magick/render.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -90,10 +90,12 @@ typedef struct _EdgeInfo
PointInfo
*points;
+ size_t
+ highwater,
+ number_points;
+
long
- number_points,
- direction,
- highwater;
+ direction;
MagickBool
ghostline;
@@ -105,7 +107,7 @@ typedef struct _PolygonInfo
EdgeInfo
*edges;
- long
+ size_t
number_edges;
} PolygonInfo;
@@ -198,11 +200,11 @@ static MagickPassFail
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,
@@ -330,12 +332,12 @@ CloneDrawInfo(const ImageInfo *image_info,const DrawInfo *draw_info)
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);
@@ -530,15 +532,17 @@ LogPolygonInfo(const PolygonInfo *polygon_info)
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",
@@ -555,12 +559,12 @@ LogPolygonInfo(const PolygonInfo *polygon_info)
}
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++)
@@ -574,13 +578,15 @@ ReversePoints(PointInfo *points,const int number_points)
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;
@@ -591,10 +597,12 @@ ConvertPathToPolygon(const PathInfo *path_info)
SegmentInfo
bounds;
- register long
- i,
+ register unsigned long
n;
+ register long
+ i;
+
MagickBool
ghostline;
@@ -1037,7 +1045,7 @@ DestroyDrawInfo(DrawInfo *draw_info)
%
% 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:
%
@@ -1047,10 +1055,9 @@ DestroyDrawInfo(DrawInfo *draw_info)
%
%
*/
-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--;
@@ -1134,12 +1141,15 @@ DestroyPolygonInfo(void *polygon_info_void)
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);
}
}
@@ -1461,8 +1471,8 @@ DrawAffineImage(Image *image,const Image *composite,
# 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;
}
@@ -1527,7 +1537,7 @@ DrawBoundingRectangles(Image *image,const DrawInfo *draw_info,
PrimitiveInfo
primitive_info[6];
- register long
+ register size_t
i;
SegmentInfo
@@ -2477,8 +2487,10 @@ DrawImage(Image *image,const DrawInfo *draw_info)
register char
*p;
+ size_t
+ i;
+
register long
- i,
x;
SegmentInfo
@@ -3379,43 +3391,44 @@ DrawImage(Image *image,const DrawInfo *draw_info)
*/
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",
@@ -3459,7 +3472,9 @@ DrawImage(Image *image,const DrawInfo *draw_info)
if (LocaleCompare("pattern",token) == 0)
{
double
- ordinate;
+ ordinate,
+ dval;
+
RectangleInfo
bounds;
@@ -3471,7 +3486,18 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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);
@@ -3480,7 +3506,18 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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);
@@ -3490,7 +3527,18 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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);
@@ -3500,7 +3548,28 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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);
@@ -3535,7 +3604,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
{
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,
@@ -3704,7 +3773,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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;
@@ -3871,7 +3940,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
{/*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)
{
@@ -3890,7 +3959,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
{/*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)
{
@@ -3941,7 +4010,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
{
double value;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&value);
+ status &= MagickAtoFChk(token,&value);
xTextCurrent = value;
break;
}
@@ -3949,7 +4018,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
{
double value;
MagickGetToken(q,&q,token,token_max_length);
- (void) MagickAtoFChk(token,&value);
+ status &= MagickAtoFChk(token,&value);
yTextCurrent = value;
break;
}
@@ -3991,11 +4060,11 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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;
@@ -4077,15 +4146,15 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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;
@@ -4093,7 +4162,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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)
@@ -4227,7 +4296,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
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:
@@ -4483,7 +4552,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
}
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;
@@ -4559,7 +4628,7 @@ DrawImage(Image *image,const DrawInfo *draw_info)
(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;
@@ -4774,10 +4843,10 @@ GetPixelOpacity(PolygonInfo * restrict polygon_info,const double mid,
register const PointInfo
*q;
- register long
+ register size_t
i;
- long
+ size_t
j;
/*
@@ -5031,7 +5100,7 @@ DrawPolygonPrimitive(Image *image,const DrawInfo *draw_info,
const PolygonInfo
* restrict polygon_info;
- register long
+ register size_t
i;
polygon_info=(const PolygonInfo *) AccessThreadViewData(polygon_set);
@@ -5866,7 +5935,8 @@ DrawPrimitive(Image *image,const DrawInfo *draw_info,
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);
@@ -6276,7 +6346,7 @@ TraceArcPath(PrimitiveInfoMgr *p_PIMgr,const PointInfo start,
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)));
@@ -6287,13 +6357,13 @@ TraceArcPath(PrimitiveInfoMgr *p_PIMgr,const PointInfo start,
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;
@@ -6324,7 +6394,7 @@ TraceArcPath(PrimitiveInfoMgr *p_PIMgr,const PointInfo start,
static MagickPassFail
TraceBezier(PrimitiveInfoMgr *p_PIMgr,
- const unsigned long number_coordinates)
+ const size_t number_coordinates)
{
double
alpha,
@@ -6343,14 +6413,12 @@ TraceBezier(PrimitiveInfoMgr *p_PIMgr,
register PrimitiveInfo
*p;
- register unsigned long
+ register size_t
i,
j;
size_t
- control_points;
-
- unsigned long
+ control_points,
quantum;
MagickPassFail
@@ -6376,7 +6444,7 @@ TraceBezier(PrimitiveInfoMgr *p_PIMgr,
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)
{
@@ -6386,7 +6454,7 @@ TraceBezier(PrimitiveInfoMgr *p_PIMgr,
goto trace_bezier_done;
}
if (alpha > quantum)
- quantum=(unsigned long) alpha;
+ quantum=(size_t) alpha;
}
}
quantum=Min(quantum/number_coordinates,BezierQuantum);
@@ -6429,7 +6497,7 @@ TraceBezier(PrimitiveInfoMgr *p_PIMgr,
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;
@@ -6657,7 +6725,7 @@ TraceLine(PrimitiveInfo *primitive_info,const PointInfo start,
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];
@@ -7471,16 +7539,16 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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;
@@ -7500,7 +7568,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
/* 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)
{
@@ -7554,13 +7622,13 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
/*
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);
@@ -7596,10 +7664,11 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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));
@@ -7707,7 +7776,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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);
@@ -7719,7 +7788,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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);
@@ -7786,7 +7855,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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);
@@ -7870,7 +7939,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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);
@@ -7911,7 +7980,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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)
{
@@ -7941,7 +8010,7 @@ TraceStrokePolygon(const Image *image, /* added Image* param so DrawInfo::strok
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:;
diff --git a/magick/render.h b/magick/render.h
index 8e922f8..c8ee529 100644
--- a/magick/render.h
+++ b/magick/render.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -308,20 +308,6 @@ typedef struct _DrawInfo
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
@@ -330,39 +316,7 @@ typedef struct _PointInfo
} 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
diff --git a/magick/resize.c b/magick/resize.c
index a33f2a1..cb6ea55 100644
--- a/magick/resize.c
+++ b/magick/resize.c
@@ -351,7 +351,7 @@ MagickExport Image *MagnifyImage(const Image * restrict image,ExceptionInfo *exc
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++)
@@ -559,11 +559,11 @@ MagickExport Image *MinifyImage(const Image * restrict image,ExceptionInfo *exce
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);
@@ -931,7 +931,7 @@ HorizontalFilter(const Image * restrict source,Image * restrict destination,
{
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))
@@ -1181,7 +1181,7 @@ VerticalFilter(const Image * restrict source,Image * restrict destination,
{
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))
@@ -1402,8 +1402,8 @@ MagickExport Image *ResizeImage(const Image *image,const unsigned long columns,
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
@@ -1455,7 +1455,7 @@ MagickExport Image *ResizeImage(const Image *image,const unsigned long columns,
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)
@@ -1464,7 +1464,7 @@ MagickExport Image *ResizeImage(const Image *image,const unsigned long columns,
}
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)
diff --git a/magick/resource.c b/magick/resource.c
index ffffd3e..f39a090 100644
--- a/magick/resource.c
+++ b/magick/resource.c
@@ -47,7 +47,7 @@
/*
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))
/*
diff --git a/magick/segment.c b/magick/segment.c
index 46e0845..9c53237 100644
--- a/magick/segment.c
+++ b/magick/segment.c
@@ -435,12 +435,12 @@ Classify(Image * restrict image,short **extrema,
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.
@@ -466,7 +466,7 @@ Classify(Image * restrict image,short **extrema,
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;
@@ -593,7 +593,7 @@ Classify(Image * restrict image,short **extrema,
# pragma omp parallel for
#endif
for (i=(-255); i <= 255; i++)
- squares[i]=i*i;
+ squares[i]=(double)i*i;
/*
Allocate image colormap.
*/
@@ -783,7 +783,7 @@ Classify(Image * restrict image,short **extrema,
#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;
diff --git a/magick/shear.c b/magick/shear.c
index 3158e82..c98bd5a 100644
--- a/magick/shear.c
+++ b/magick/shear.c
@@ -551,8 +551,8 @@ IntegralRotateImage(const Image *image,unsigned int rotations,
#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();
@@ -650,7 +650,7 @@ IntegralRotateImage(const Image *image,unsigned int rotations,
/*
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;
@@ -673,7 +673,7 @@ IntegralRotateImage(const Image *image,unsigned int rotations,
*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;
@@ -874,8 +874,8 @@ IntegralRotateImage(const Image *image,unsigned int rotations,
#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();
@@ -973,7 +973,7 @@ IntegralRotateImage(const Image *image,unsigned int rotations,
/*
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;
@@ -996,7 +996,7 @@ IntegralRotateImage(const Image *image,unsigned int rotations,
*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;
@@ -1225,9 +1225,9 @@ XShearImage(Image *image,const double degrees,
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;
@@ -1245,7 +1245,7 @@ XShearImage(Image *image,const double degrees,
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);
@@ -1337,7 +1337,7 @@ XShearImage(Image *image,const double degrees,
thread_status=MagickFail;
break;
}
- p+=x_offset+width;
+ p+= (ptrdiff_t)x_offset+width;
q=p+step;
for (i=0; i < (long) width; i++)
{
@@ -1540,9 +1540,9 @@ YShearImage(Image *image,const double degrees,
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;
@@ -1560,7 +1560,7 @@ YShearImage(Image *image,const double degrees,
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);
@@ -1652,7 +1652,7 @@ YShearImage(Image *image,const double degrees,
thread_status=MagickFail;
break;
}
- p+=y_offset+height;
+ p+= (ptrdiff_t)y_offset+height;
q=p+step;
for (i=0; i < (long) height; i++)
{
diff --git a/magick/signature.c b/magick/signature.c
index 67f87de..27b0cd8 100644
--- a/magick/signature.c
+++ b/magick/signature.c
@@ -87,10 +87,10 @@ MagickExport void FinalizeSignature(SignatureInfo *signature_info)
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);
}
@@ -202,7 +202,7 @@ MagickExport unsigned int SignatureImage(Image *image)
*/
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);
diff --git a/magick/studio.h b/magick/studio.h
index 2785e16..66c43e8 100644
--- a/magick/studio.h
+++ b/magick/studio.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -95,6 +95,7 @@ extern "C" {
# 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
@@ -530,30 +531,28 @@ extern int vsnprintf(char *s, size_t n, const char *format, va_list ap);
# undef omp_set_num_threads
# define omp_set_num_threads(nthreads)
#endif /* !defined(HAVE_OPENMP) */
-
/*
- 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)
}
diff --git a/magick/symbols.h b/magick/symbols.h
index 4944ece..1a1077c 100644
--- a/magick/symbols.h
+++ b/magick/symbols.h
@@ -67,7 +67,6 @@
#define AttachBlob GmAttachBlob
#define AutoOrientImage GmAutoOrientImage
#define AverageImages GmAverageImages
-#define BackgroundColor GmBackgroundColor
#define Base64Decode GmBase64Decode
#define Base64Encode GmBase64Encode
#define BenchmarkImageCommand GmBenchmarkImageCommand
@@ -80,7 +79,6 @@
#define BlobWriteByteHook GmBlobWriteByteHook
#define BlurImage GmBlurImage
#define BlurImageChannel GmBlurImageChannel
-#define BorderColor GmBorderColor
#define BorderImage GmBorderImage
#define CatchException GmCatchException
#define CatchImageException GmCatchImageException
@@ -135,9 +133,6 @@
#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
@@ -321,7 +316,6 @@
#define FlattenImages GmFlattenImages
#define FlipImage GmFlipImage
#define FlopImage GmFlopImage
-#define ForegroundColor GmForegroundColor
#define FormatSize GmFormatSize
#define FormatString GmFormatString
#define FormatStringList GmFormatStringList
@@ -436,11 +430,11 @@
#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
@@ -472,7 +466,7 @@
#define InitializeLogInfoPost GmInitializeLogInfoPost
#define InitializeMagicInfo GmInitializeMagicInfo
#define InitializeMagick GmInitializeMagick
-#define InitializeMagickClientPathAndName GmInitializeMagickClientPathAndName
+#define InitializeMagickEx GmInitializeMagickEx
#define InitializeMagickExceptionHandling GmInitializeMagickExceptionHandling
#define InitializeMagickModules GmInitializeMagickModules
#define InitializeMagickMonitor GmInitializeMagickMonitor
@@ -480,7 +474,6 @@
#define InitializeMagickRandomKernel GmInitializeMagickRandomKernel
#define InitializeMagickRegistry GmInitializeMagickRegistry
#define InitializeMagickResources GmInitializeMagickResources
-#define InitializeMagickSignalHandlers GmInitializeMagickSignalHandlers
#define InitializePixelIteratorOptions GmInitializePixelIteratorOptions
#define InitializeSemaphore GmInitializeSemaphore
#define InitializeTemporaryFiles GmInitializeTemporaryFiles
@@ -702,7 +695,6 @@
#define MapImage GmMapImage
#define MapImages GmMapImages
#define MapModeToString GmMapModeToString
-#define MatteColor GmMatteColor
#define MatteFloodfillImage GmMatteFloodfillImage
#define MedianFilterImage GmMedianFilterImage
#define MetricTypeToString GmMetricTypeToString
@@ -733,8 +725,6 @@
#define OpenModules GmOpenModules
#define OrderedDitherImage GmOrderedDitherImage
#define OrientationTypeToString GmOrientationTypeToString
-#define PSDensityGeometry GmPSDensityGeometry
-#define PSPageGeometry GmPSPageGeometry
#define PackbitsEncode2Image GmPackbitsEncode2Image
#define PackbitsEncodeImage GmPackbitsEncodeImage
#define PanicDestroyMagick GmPanicDestroyMagick
@@ -961,8 +951,10 @@
#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
diff --git a/magick/tempfile-private.h b/magick/tempfile-private.h
new file mode 100644
index 0000000..e03faf5
--- /dev/null
+++ b/magick/tempfile-private.h
@@ -0,0 +1,53 @@
+/*
+ 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:
+ */
diff --git a/magick/tempfile.h b/magick/tempfile.h
index c958cfe..2a8c61a 100644
--- a/magick/tempfile.h
+++ b/magick/tempfile.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -21,7 +21,6 @@ typedef enum
TextFileIOMode
} FileIOMode;
-
MagickExport MagickPassFail
AcquireTemporaryFileName(char *filename),
LiberateTemporaryFile(char *filename);
@@ -33,43 +32,7 @@ MagickExport FILE *
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)
diff --git a/magick/timer.c b/magick/timer.c
index 719522d..fcd226b 100644
--- a/magick/timer.c
+++ b/magick/timer.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -63,10 +63,6 @@
*/
static double
UserTime(void);
-
-static void
- StartTimer(TimerInfo *,const unsigned int),
- StopTimer(TimerInfo *);
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -344,7 +340,7 @@ MagickExport void ResetTimer(TimerInfo *time_info)
% 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);
@@ -386,7 +382,7 @@ static void StartTimer(TimerInfo *time_info,const unsigned int reset)
% 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);
diff --git a/magick/timer.h b/magick/timer.h
index 1ed1d20..b7007e0 100644
--- a/magick/timer.h
+++ b/magick/timer.h
@@ -62,7 +62,9 @@ extern MagickExport unsigned int
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)
}
diff --git a/magick/transform.c b/magick/transform.c
index 0e6d61e..40c5c04 100644
--- a/magick/transform.c
+++ b/magick/transform.c
@@ -1,5 +1,5 @@
/*
-% 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
%
@@ -1626,7 +1626,7 @@ MagickExport Image *ShaveImage(const Image *image,
%
% 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:
@@ -1641,8 +1641,8 @@ MagickExport Image *ShaveImage(const Image *image,
%
%
*/
-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,
@@ -1655,6 +1655,9 @@ MagickExport void TransformImage(Image **image,const char *crop_geometry,
int
flags;
+ MagickPassFail
+ status = MagickPass;
+
assert(image != (Image **) NULL);
assert((*image)->signature == MagickSignature);
transform_image=(*image);
@@ -1673,6 +1676,8 @@ MagickExport void TransformImage(Image **image,const char *crop_geometry,
(flags & PercentValue))
{
crop_image=CropImage(transform_image,&geometry,&(*image)->exception);
+ if (crop_image == (Image *) NULL)
+ status = MagickFail;
}
else
if ((transform_image->columns > geometry.width) ||
@@ -1716,7 +1721,10 @@ MagickExport void TransformImage(Image **image,const char *crop_geometry,
}
}
if (next == (Image *) NULL)
- break;
+ {
+ status=MagickFail;
+ break;
+ }
}
}
if (crop_image != (Image *) NULL)
@@ -1733,7 +1741,7 @@ MagickExport void TransformImage(Image **image,const char *crop_geometry,
*image=transform_image;
}
if (image_geometry == (const char *) NULL)
- return;
+ return status;
/*
Scale image to a user specified size.
@@ -1743,7 +1751,7 @@ MagickExport void TransformImage(Image **image,const char *crop_geometry,
&geometry.width,&geometry.height);
if ((transform_image->columns == geometry.width) &&
(transform_image->rows == geometry.height))
- return;
+ return status;
/*
Resize image.
@@ -1751,11 +1759,15 @@ MagickExport void TransformImage(Image **image,const char *crop_geometry,
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;
}
diff --git a/magick/transform.h b/magick/transform.h
index 812f01d..b2e763b 100644
--- a/magick/transform.h
+++ b/magick/transform.h
@@ -28,7 +28,7 @@ extern MagickExport Image
*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)
diff --git a/magick/type-private.h b/magick/type-private.h
new file mode 100644
index 0000000..0e4bfc7
--- /dev/null
+++ b/magick/type-private.h
@@ -0,0 +1,24 @@
+/*
+ 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:
+ */
diff --git a/magick/type.h b/magick/type.h
index b55ee94..98ec5ee 100644
--- a/magick/type.h
+++ b/magick/type.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -93,13 +93,7 @@ extern MagickExport const TypeInfo
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)
diff --git a/magick/utility-private.h b/magick/utility-private.h
new file mode 100644
index 0000000..7afb1c7
--- /dev/null
+++ b/magick/utility-private.h
@@ -0,0 +1,59 @@
+/*
+ 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:
+ */
diff --git a/magick/utility.c b/magick/utility.c
index d949a9f..7dc88c1 100644
--- a/magick/utility.c
+++ b/magick/utility.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -827,6 +827,17 @@ MagickExport void ExpandFilename(char *filename)
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;
@@ -837,15 +848,28 @@ MagickExport void ExpandFilename(char *filename)
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);
@@ -984,8 +1008,8 @@ MagickExport MagickPassFail ExpandFilenames(int *argc,char ***argv)
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);
@@ -1075,7 +1099,7 @@ MagickExport MagickPassFail ExpandFilenames(int *argc,char ***argv)
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);
@@ -1465,7 +1489,7 @@ MagickExport MagickPassFail GetExecutionPathUsingName(char *path)
const char
*separator;
- int
+ size_t
length;
separator = strchr(start,DirectoryListSeparator);
@@ -1595,7 +1619,7 @@ MagickExport int GetGeometry(const char *image_geometry,long *x,long *y,
for (c=image_geometry; *c != 0 ; c++)
{
- if (isspace((int)(unsigned char) (*c)))
+ if (isspace((int) (*c)))
{
continue;
}
@@ -1675,7 +1699,7 @@ MagickExport int GetGeometry(const char *image_geometry,long *x,long *y,
bounds.x=0;
bounds.y=0;
p=geometry;
- while (isspace((int)(unsigned char) *p))
+ while ((isspace((int)(*p))))
p++;
if (*p == '\0')
return(flags);
@@ -4957,7 +4981,7 @@ MagickExport char **StringToArgv(const char *text,int *argc)
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,
@@ -6283,7 +6307,7 @@ MagickExport char *TranslateTextEx(const ImageInfo *image_info,
q+=(translate)(q,buffer,MaxTextExtent);
break;
}
- FormatString(buffer,"%lu",DefaultCompressionQuality);
+ FormatString(buffer,"%u",DefaultCompressionQuality);
q+=(translate)(q,buffer,MaxTextExtent);
break;
}
diff --git a/magick/utility.h b/magick/utility.h
index 82b6cd9..bedacc0 100644
--- a/magick/utility.h
+++ b/magick/utility.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -161,47 +161,7 @@ extern MagickExport size_t
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)
diff --git a/magick/version.h b/magick/version.h
index 3795fdd..393861a 100644
--- a/magick/version.h
+++ b/magick/version.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -34,12 +34,12 @@ extern "C" {
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
@@ -54,7 +54,7 @@ extern "C" {
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)
diff --git a/magick/version.h.in b/magick/version.h.in
index 2728230..841ae2d 100644
--- a/magick/version.h.in
+++ b/magick/version.h.in
@@ -1,5 +1,5 @@
/*
- 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
@@ -34,7 +34,7 @@ extern "C" {
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@
diff --git a/magick/xwindow.c b/magick/xwindow.c
index b1de8b5..e5c6cfb 100644
--- a/magick/xwindow.c
+++ b/magick/xwindow.c
@@ -1,5 +1,5 @@
/*
-% 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
@@ -5146,6 +5146,7 @@ MagickXImportImage(const ImageInfo *image_info,
(void) XBell(display,0);
}
(void) XCloseDisplay(display);
+ StopTimer(&image->timer);
return(image);
}
diff --git a/scripts/html_fragments.py b/scripts/html_fragments.py
index cb2bb7c..7518325 100644
--- a/scripts/html_fragments.py
+++ b/scripts/html_fragments.py
@@ -58,7 +58,7 @@ nav_template = """
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>
"""
diff --git a/tests/bitstream.c b/tests/bitstream.c
index 01cb7f8..8175996 100644
--- a/tests/bitstream.c
+++ b/tests/bitstream.c
@@ -114,7 +114,7 @@ int main ( int argc, char *argv[])
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);
diff --git a/tests/rwblob.c b/tests/rwblob.c
index 2dd55e3..15881d7 100644
--- a/tests/rwblob.c
+++ b/tests/rwblob.c
@@ -441,6 +441,17 @@ int main ( int argc, char **argv )
(!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;
diff --git a/tests/rwfile.c b/tests/rwfile.c
index 43a9ef9..b1f7db7 100644
--- a/tests/rwfile.c
+++ b/tests/rwfile.c
@@ -537,6 +537,17 @@ int main ( int argc, char **argv )
(!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;
diff --git a/utilities/gm.1 b/utilities/gm.1
index ce5c020..329489d 100644
--- a/utilities/gm.1
+++ b/utilities/gm.1
@@ -1,4 +1,4 @@
-.TH gm 1 "2019/08/27" "GraphicsMagick"
+.TH gm 1 "2019/12/29" "GraphicsMagick"
.TP
.in 15
.in 15
@@ -1275,6 +1275,22 @@ in order to read or write using the necessary sample order.
.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
@@ -10559,7 +10575,7 @@ software was configured and the host system.
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:
diff --git a/version.sh b/version.sh
index 69dadfa..6cd6dfa 100755
--- a/version.sh
+++ b/version.sh
@@ -17,7 +17,7 @@ PACKAGE_BUGREPORT='graphicsmagick-bugs@lists.sourceforge.net'
# 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.
@@ -27,8 +27,7 @@ PACKAGE_STRING="$PACKAGE_NAME $PACKAGE_VERSION"
#
# 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
@@ -86,20 +85,20 @@ HG_BRANCH_TAG=GraphicsMagick-1_3
#
# 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
diff --git a/wand/drawing_wand.c b/wand/drawing_wand.c
index b4d82fa..c337e7a 100644
--- a/wand/drawing_wand.c
+++ b/wand/drawing_wand.c
@@ -446,7 +446,7 @@ WandExport DrawingWand *CloneDrawingWand(const DrawingWand *drawing_wand)
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)
{
@@ -455,7 +455,7 @@ WandExport DrawingWand *CloneDrawingWand(const DrawingWand *drawing_wand)
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++)
{
@@ -3831,7 +3831,7 @@ WandExport void DrawPushGraphicContext(DrawingWand *drawing_wand)
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--;
@@ -4492,7 +4492,7 @@ WandExport double *DrawGetStrokeDashArray(const DrawingWand *drawing_wand,
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;
@@ -4594,7 +4594,7 @@ WandExport void DrawSetStrokeDashArray(DrawingWand *drawing_wand,
if (n_new != 0)
{
CurrentContext->dash_pattern=MagickAllocateArray(double *,
- (n_new+1),
+ ((size_t) n_new+1),
sizeof(double));
if (!CurrentContext->dash_pattern)
{
diff --git a/www/ChangeLog-2009.html b/www/ChangeLog-2009.html
index 6564a97..1fa41be 100644
--- a/www/ChangeLog-2009.html
+++ b/www/ChangeLog-2009.html
@@ -567,6 +567,12 @@ SetImagePixels().</li>
<p>2009-09-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
+<li>version.sh: Released GraphicsMagick 1.3.7.</li>
+</ul>
+</blockquote>
+<p>2009-09-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
diff --git a/www/ChangeLog-2010.html b/www/ChangeLog-2010.html
index 9f41146..cb5ecb4 100644
--- a/www/ChangeLog-2010.html
+++ b/www/ChangeLog-2010.html
@@ -503,6 +503,12 @@ proceed to the next file name rather than quitting. Problem was
reported by Patrick Welche.</li>
</ul>
</blockquote>
+<p>2010-03-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>version.sh: Released GraphicsMagick 1.3.12.</li>
+</ul>
+</blockquote>
<p>2010-03-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
@@ -552,6 +558,12 @@ binary flag. This is intended to resolve Debian bug 571719
Vladimir Stavrinov.</li>
</ul>
</blockquote>
+<p>2010-02-21 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>version.sh: Released GraphicsMagick 1.3.11.</li>
+</ul>
+</blockquote>
<p>2010-02-19 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
@@ -585,6 +597,12 @@ character value is in the extended range. Problem reported by
Arseny Solokha. Resolves SourceForge patch #2953314.</li>
</ul>
</blockquote>
+<p>2010-02-10 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>version.sh: Released GraphicsMagick 1.3.10.</li>
+</ul>
+</blockquote>
<p>2010-02-09 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
@@ -611,6 +629,12 @@ correctly for the case when only one image frame is present. With
Coetzee.</li>
</ul>
</blockquote>
+<p>2010-02-04 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>version.sh: Released GraphicsMagick 1.3.9.</li>
+</ul>
+</blockquote>
<p>2010-02-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
@@ -698,6 +722,13 @@ omp_get_max_threads(). Otherwise there is a crash if the number
of threads is reduced from the original value.</li>
</ul>
</blockquote>
+<p>2010-01-21 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
diff --git a/www/ChangeLog-2019.html b/www/ChangeLog-2019.html
new file mode 100644
index 0000000..98429e0
--- /dev/null
+++ b/www/ChangeLog-2019.html
@@ -0,0 +1,1506 @@
+<?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" />&nbsp;<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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</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 &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;gradient:direction&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;heap-buffer-overflow in WritePCXImage&quot;
+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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/nt_base.h (&quot;C&quot;): Assume that float versions of functions
+became available in Visual Studio 2008.</li>
+</ul>
+</blockquote>
+<p>2019-12-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 (&quot;C&quot;): 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
+&quot;static&quot; module loader was implemented. Due to an error in the
+preprocessor logic, only the &quot;modules&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;heap-buffer-overflow in function EncodeImage of coders/pict.c&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-12-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_MVG_fuzzer:
+Indirect-leak in CloneImage&quot;.
+(PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
+memory.</li>
+</ul>
+</blockquote>
+<p>2019-11-23 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
+17986 &quot;graphicsmagick:coder_JPG_fuzzer: Heap-buffer-overflow in
+GenerateEXIFAttribute&quot;. This problem likely only happens in
+32-bit builds.</li>
+</ul>
+</blockquote>
+<p>2019-11-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;TclMagick issues and
+patch&quot;. 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 &quot;TclMagick issues
+and patch&quot;. 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 &quot;TclMagick issues and patch&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-11-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 (&quot;MAGICK_FALLTHROUGH&quot;): 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_PICON_fuzzer: Timeout in
+coder_PICON_fuzzer&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-10-14 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>configure.ac: Fix tcmalloc configuration report.</li>
+</ul>
+</blockquote>
+<p>2019-10-13 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_MAT_fuzzer: Out-of-memory in
+graphicsmagick_coder_MAT_fuzzer&quot;.</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
+&quot;graphicsmagick:enhance_fuzzer: Timeout in enhance_fuzzer&quot; and
+oss-fuzz issue 17714 &quot;graphicsmagick:coder_WPG_fuzzer: Timeout in
+coder_WPG_fuzzer&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-10-12 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Timeout · coder_PNM_fuzzer&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-10-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/attribute.c (GenerateEXIFAttribute): Skip
+unsupported/invalid format 0. Fixes oss-fuzz issue 17597
+&quot;graphicsmagick:coder_SFW_fuzzer: Heap-buffer-overflow in
+GenerateEXIFAttribute&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-09-19 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;static module loader is still
+case-sensitive&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-09-16 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/render.c (TraceArcPath): Substitute a lineto command when
+tracing arc is impossible. Fixes oss-fuzz 10765
+&quot;graphicsmagick/coder_MVG_fuzzer: Divide-by-zero in TraceArcPath&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-09-14 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/png.c (png_read_raw_profile): Fix validation of raw
+profile length. Fixes oss-fuzz 16906
+&quot;graphicsmagick:coder_ICO_fuzzer: Out-of-memory in
+graphicsmagick_coder_ICO_fuzzer&quot;.</li>
+<li>coders/wpg.c (ReallocColormap): Avoid dereferencing a null
+pointer if image-&gt;colormap is null. Fixes oss-fuzz 17004
+&quot;graphicsmagick:coder_WPG_fuzzer: Null-dereference READ in
+ReallocColormap&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-09-13 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>doc/GraphicsMagick.imdoc: Document gm utility exit status codes.</li>
+</ul>
+</blockquote>
+<p>2019-08-25 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_JPEG_fuzzer: Timeout in
+graphicsmagick_coder_JPEG_fuzzer&quot; and 16068
+&quot;graphicsmagick/coder_SFW_fuzzer: Timeout in
+graphicsmagick_coder_SFW_fuzzer&quot;.</li>
+<li>tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
+irritating GCC 9 &quot;__builtin_strncpy' output may be truncated&quot;
+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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick/coder_MVG_fuzzer:
+Timeout in graphicsmagick_coder_MVG_fuzzer&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-08-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_MVG_fuzzer: Unexpected-exit
+in DefaultFatalErrorHandler&quot;.
+(PrimitiveInfoRealloc): Implement more paranoid code related to
+primitive allocation.</li>
+</ul>
+</blockquote>
+<p>2019-08-16 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/render.c (DrawStrokePolygon): Handle case where
+TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
+&quot;graphicsmagick/coder_MVG_fuzzer: ASSERT: primitive_info !=
+(PrimitiveInfo *) NULL&quot;.
+(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 &quot;graphicsmagick/coder_MVG_fuzzer: Timeout
+in graphicsmagick_coder_MVG_fuzzer&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-08-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/png.c (ReadMNGImage): Skip coalescing layers if there is
+only one layer. Fixes oss-fuzz 16274
+&quot;graphicsmagick/coder_MNG_fuzzer: Unexpected-exit in
+DefaultFatalErrorHandler&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-08-12 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick:coder_PNG8_fuzzer: Timeout in
+graphicsmagick_coder_PNG8_fuzzer&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-07-20 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;WriteOnePNGImage(): Fix saving to palette when image has an alpha
+channel but no color is marked as transparent&quot;.</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 &quot;Fix documentation
+typo&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-07-07 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/attribute.c (GenerateEXIFAttribute): Added range checks
+and tracing. Fixes oss-fuzz 14998
+&quot;graphicsmagick/coder_JPEG_fuzzer: Heap-buffer-overflow in
+Read32s&quot;. 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 &quot;graphicsmagick/coder_MPC_fuzzer:
+Out-of-memory in graphicsmagick_coder_MPC_fuzzer&quot;.</li>
+<li>doc/options.imdoc: Add notes about security hazards due to
+commands which support a <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</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:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>' syntax.</li>
+</ul>
+</blockquote>
+<p>2019-06-22 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/render.c (DrawImage): Assure that 'token' is initialized.
+Fixes oss-fuzz issue 14897 &quot;graphicsmagick/coder_MVG_fuzzer:
+Use-of-uninitialized-value in DrawImage&quot;.</li>
+<li>magick/animate.c (MagickXAnimateImages): Fix memory leak of
+scene_info.pixels.</li>
+<li>magick/display.c (MagickXDisplayImage): Fix heap overwrite of
+windows-&gt;image.name and windows-&gt;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 '&#64;' 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/render.c (DrawImage): Terminate drawing if
+DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
+&quot;graphicsmagick/coder_MVG_fuzzer: Timeout in
+graphicsmagick_coder_MVG_fuzzer&quot;.
+(TracePath): Terminate path parsing upon first parsing error.</li>
+</ul>
+</blockquote>
+<p>2019-06-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/render.c (DrawImage): Only support <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</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:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>' syntax due to security concerns.
+Problem was reported to us by &quot;Battle Furry&quot; via the
+GraphicsMagick security mail alias on June 6, 2019.</li>
+</ul>
+</blockquote>
+<p>2019-06-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/utility.c (SetClientFilename): Reduce initialized data
+some more.</li>
+</ul>
+</blockquote>
+<p>2019-06-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/nt_base.c: Search for n019003l.pfb (the &quot;Helvetica&quot;-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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/mat.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-22 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Add braille
+image format support.</li>
+</ul>
+</blockquote>
+<p>2019-05-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/enum_strings.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/command.c: Make more data const.</li>
+</ul>
+</blockquote>
+<p>2019-05-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;heap-use-after-free in function ThrowLoggedException of
+magick/error.c&quot;.
+(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
+&quot;heap-buffer-overflow in ImportRLEPixels of coders/miff.c.</li>
+</ul>
+</blockquote>
+<p>2019-05-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>NEWS.txt: Update news.</li>
+<li>magick/utility.c (ExpandFilenames): Only expand <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>' to a
+list of arguments read from 'filename' if the path <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>'
+does not exist. This fix is made based on an email posting to the
+'graphicsmagick-help' mailing list at SourceForge by &quot;Test User&quot;
+on Tue, 7 May 2019.</li>
+</ul>
+</blockquote>
+<p>2019-05-05 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Multiple crashes (FPE and
+invalid read) when processing XWD files&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Multiple crashes (FPE and invalid read) when
+processing XWD files&quot;. 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Multiple crashes (FPE and invalid read) when processing
+XWD files&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-13 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_PDB_fuzzer: Use-of-uninitialized-value in
+WritePDBImage&quot;, 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
+&quot;graphicsmagick/coder_MVG_fuzzer: Integer-overflow in DrawImage&quot;.</li>
+<li>magick/pixel_cache.c (SetNexus): Fix oss-fuzz issue 14208
+&quot;graphicsmagick/coder_MVG_fuzzer: Integer-overflow in SetNexus&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;heap-buffer-overflow in
+function WriteMATLABImage of coders/mat.c&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-10 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
+&quot;heap-buffer-overflow in function WritePDBImage of coders/pdb.c&quot;.</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
+bounding box. Fixes SourceForge issue #606 &quot;Division by Zero in
+coders/wmf.c&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-07 Fojtik Jaroslav &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/nt_base.c Fix a problem of finding ghostscript fonts.
+Variable &quot;font_dir&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;heap_buffer_overflow_WRITE in function WriteXWDImage of
+coders/xwd.c&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-05 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/svg.c (SVGStartElement): Fix stack buffer overflow while
+parsing quoted font family value. Fixes SourceForge issue #600
+&quot;stack-buffer-overflow in function SVGStartElement of
+coders/svg.c&quot;.</li>
+<li>coders/miff.c (ReadMIFFImage): Detect end of file while reading
+RLE packets. Fixes SourceForge issue #598 &quot;heap-buffer-overflow
+in function ReadMIFFImage of coders/miff.c&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
+reading DirectClass XWD file. Fixes SourceForge issue #597
+&quot;heap-buffer-overflow in function ReadXWDImage of coders/xwd.c&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-04-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/png.c (ReadMNGImage): Fix small buffer overflow (one
+PixelPacket) of image colormap. Fixes SourceForge issue #596
+&quot;heap-buffer-overflow in function CloneImage of magick/image.c&quot;.</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;memory leak in function ReadMPCImage of coders/mpc.c &quot;.</li>
+<li>magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
+case that the memory allocation for window-&gt;segment_info
+fails. Fixes SourceForge #595 &quot;use allocate memory before null
+check&quot; 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 &quot;use
+allocate memory before null check&quot; as pertains to
+magick/segment.c.</li>
+<li>coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
+null check. Fixes SourceForge #595 &quot;use allocate memory before
+null check&quot; as pertains to coders/pdb.c.</li>
+</ul>
+</blockquote>
+<p>2019-03-30 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick/coder_MAT_fuzzer:
+Direct-leak in ReadMATImage&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-06 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_MAT_fuzzer: Use-of-uninitialized-value in
+InsertComplexFloatRow&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-04 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/txt.c (ReadTXTImage): Don't start new line if x_max &lt;
+x_min. Avoids calling SetImagePixels() with a width of zero.
+Related to oss-fuzz 13521 &quot;graphicsmagick/coder_TEXT_fuzzer:
+Floating-point-exception in SetNexus&quot;. (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
+&quot;graphicsmagick/coder_TEXT_fuzzer: Floating-point-exception in
+SetNexus&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_MVG_fuzzer: Integer-overflow in
+SetNexus&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-03-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Unexpected end-of-file&quot; if reader encounters end of
+file while reading header rows. Addresses oss-fuzz 7981
+&quot;graphicsmagick/coder_TOPOL_fuzzer: Use-of-uninitialized-value in
+InsertRow&quot;. (Credit to OSS-Fuzz)</li>
+<li>coders/mat.c (ReadMATImage): Report a corrupt image exception
+&quot;Unexpected end-of-file&quot; if reader encounters end of file while
+reading scanlines. Also added some helpful traces. Hopefully
+addresses oss-fuzz 13445 &quot;graphicsmagick/coder_MAT_fuzzer:
+Use-of-uninitialized-value in IsGrayImage&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-26 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/image.h (&quot;C&quot;): Include as &quot;magick/image-private.h&quot; as the
+other headers are.
+(&quot;C&quot;): Include &quot;magick/image-private.h&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_MIFF_fuzzer: Timeout in
+graphicsmagick_coder_MIFF_fuzzer&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_MVG_fuzzer: Heap-buffer-overflow in
+DrawDashPolygon&quot;. 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Heap buffer overflow in
+DrawDashPolygon when parsing SVG images&quot;.
+(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 &quot;Unreasonable dimensions&quot; delivered yesterday
+was flawed since magick_rows and magick_columns are only set if a
+desired image size was provided. Fixes SourceForge issue 592
+&quot;Non-malicious JPEG file fails with &quot;Unreasonable dimensions&quot;&quot;.</li>
+<li>coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
+for images where photometic is PHOTOMETRIC_RGB. Fixes oss-fuzz
+13115 &quot;graphicsmagick/coder_PTIF_fuzzer:
+Use-of-uninitialized-value in DisassociateAlphaRegion&quot;. (Credit to
+OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/jpeg.c (ReadJPEGImage): Base test for &quot;Unreasonable
+dimensions&quot; on original JPEG dimensions and not the scaled
+dimensions. Fixes SourceForge issue 593 &quot;gm convert: Insufficient
+image data in file when hinting input image&quot;.</li>
+</ul>
+</blockquote>
+<p>2019-02-13 Troy Patteson &lt;<a class="reference external" href="mailto:troyp&#37;&#52;&#48;ieee&#46;org">troyp<span>&#64;</span>ieee<span>&#46;</span>org</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick/coder_PTIF_fuzzer:
+Use-of-uninitialized-value in DisassociateAlphaRegion&quot;. (Credit to
+OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
+returning. Similar to ImageMagick CVE-2019-7397 &quot;In ImageMagick
+before 7.0.8-25, several memory leaks exist in WritePDFImage in
+coders/pdf.c.&quot;. Thanks to Petr Gajdos for bringing this issue to
+our attention.</li>
+</ul>
+</blockquote>
+<p>2019-02-10 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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-&gt;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
+&quot;graphicsmagick/enhance_fuzzer: Out-of-memory in
+graphicsmagick_enhance_fuzzer&quot;. (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
+&quot;graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
+VerticalFilter&quot;.</li>
+<li>coders/dpx.c (AttributeToString): Eliminate clang
+&quot;-Wstring-plus-int&quot; warning observed in oss-fuzz build.</li>
+<li>coders/cineon.c (AttributeToString): Eliminate clang
+&quot;-Wstring-plus-int&quot; warning observed in oss-fuzz build.</li>
+</ul>
+</blockquote>
+<p>2019-02-09 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/coder_PICT_fuzzer: Heap-buffer-overflow in
+ExpandBuffer&quot;. (Credit to OSS-Fuzz)</li>
+<li>coders/wpg.c (ReadWPGImage): Assure that all colormap entries
+are initialized. Fixes oss-fuzz 12614
+&quot;graphicsmagick/enhance_fuzzer: Use-of-uninitialized-value in
+EnhanceImage&quot;. (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
+&quot;graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
+ExportGrayQuantumType&quot;. (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 &quot;graphicsmagick/coder_MIFF_fuzzer:
+Use-of-uninitialized-value in RGBTransformPackets&quot;. (Credit to
+OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick/enhance_fuzzer: Out-of-memory in
+graphicsmagick_enhance_fuzzer&quot;. (Credit to OSS-Fuzz)</li>
+</ul>
+</blockquote>
+<p>2019-02-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;heap-buffer-overflow in ReadBMPImage of bmp.c&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
+support WebP 'use_sharp_yuv' option (&quot;if needed, use sharp (and
+slow) RGB-&gt;YUV conversion&quot;) via <cite>-define webp:use-sharp-yuv=true</cite>.</li>
+</ul>
+</blockquote>
+<p>2019-01-05 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>magick/pixel_cache.c (SetNexus): Merge IsNexusInCore()
+implementation code into SetNexus() and add check for if
+cache_info-&gt;pixels is null. Fixes SourceForge issue #588 &quot;Bug in
+IsNexusInCore()&quot;.</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 &quot;Identify lack of data (no Exif) in RAW formats&quot;.</li>
+</ul>
+</blockquote>
+</div>
+</body>
+</html>
diff --git a/www/ChangeLog-2019.rst b/www/ChangeLog-2019.rst
new file mode 100644
index 0000000..fd49808
--- /dev/null
+++ b/www/ChangeLog-2019.rst
@@ -0,0 +1,1377 @@
+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".
diff --git a/www/Changelog.html b/www/Changelog.html
index 4b7f311..665cfef 100644
--- a/www/Changelog.html
+++ b/www/Changelog.html
@@ -3,8 +3,8 @@
<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>
@@ -35,1382 +35,340 @@
<div class="document">
-<p>2019-12-24 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-23 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-22 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/nt_base.h (&quot;C&quot;): Assume that float versions of functions
-became available in Visual Studio 2008.</li>
-</ul>
-</blockquote>
-<p>2019-12-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 (&quot;C&quot;): 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
-&quot;static&quot; module loader was implemented. Due to an error in the
-preprocessor logic, only the &quot;modules&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;heap-buffer-overflow in function EncodeImage of coders/pict.c&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-12-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_MVG_fuzzer:
-Indirect-leak in CloneImage&quot;.
-(PrimitiveInfoRealloc): Clear freshly-allocated PrimitiveInfo
-memory.</li>
-</ul>
-</blockquote>
-<p>2019-11-23 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/attribute.c (GenerateEXIFAttribute): Fix oss-fuzz issue
-17986 &quot;graphicsmagick:coder_JPG_fuzzer: Heap-buffer-overflow in
-GenerateEXIFAttribute&quot;. This problem likely only happens in
-32-bit builds.</li>
-</ul>
-</blockquote>
-<p>2019-11-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;TclMagick issues and
-patch&quot;. 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 &quot;TclMagick issues
-and patch&quot;. 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 &quot;TclMagick issues and patch&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-11-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 (&quot;MAGICK_FALLTHROUGH&quot;): 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_PICON_fuzzer: Timeout in
-coder_PICON_fuzzer&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-10-14 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>configure.ac: Fix tcmalloc configuration report.</li>
-</ul>
-</blockquote>
-<p>2019-10-13 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_MAT_fuzzer: Out-of-memory in
-graphicsmagick_coder_MAT_fuzzer&quot;.</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
-&quot;graphicsmagick:enhance_fuzzer: Timeout in enhance_fuzzer&quot; and
-oss-fuzz issue 17714 &quot;graphicsmagick:coder_WPG_fuzzer: Timeout in
-coder_WPG_fuzzer&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-10-12 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Timeout · coder_PNM_fuzzer&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-10-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/attribute.c (GenerateEXIFAttribute): Skip
-unsupported/invalid format 0. Fixes oss-fuzz issue 17597
-&quot;graphicsmagick:coder_SFW_fuzzer: Heap-buffer-overflow in
-GenerateEXIFAttribute&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-09-19 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;static module loader is still
-case-sensitive&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-09-16 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/render.c (TraceArcPath): Substitute a lineto command when
-tracing arc is impossible. Fixes oss-fuzz 10765
-&quot;graphicsmagick/coder_MVG_fuzzer: Divide-by-zero in TraceArcPath&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-09-14 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/png.c (png_read_raw_profile): Fix validation of raw
-profile length. Fixes oss-fuzz 16906
-&quot;graphicsmagick:coder_ICO_fuzzer: Out-of-memory in
-graphicsmagick_coder_ICO_fuzzer&quot;.</li>
-<li>coders/wpg.c (ReallocColormap): Avoid dereferencing a null
-pointer if image-&gt;colormap is null. Fixes oss-fuzz 17004
-&quot;graphicsmagick:coder_WPG_fuzzer: Null-dereference READ in
-ReallocColormap&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-09-13 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>doc/GraphicsMagick.imdoc: Document gm utility exit status codes.</li>
-</ul>
-</blockquote>
-<p>2019-08-25 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_JPEG_fuzzer: Timeout in
-graphicsmagick_coder_JPEG_fuzzer&quot; and 16068
-&quot;graphicsmagick/coder_SFW_fuzzer: Timeout in
-graphicsmagick_coder_SFW_fuzzer&quot;.</li>
-<li>tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Eliminate
-irritating GCC 9 &quot;__builtin_strncpy' output may be truncated&quot;
-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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick/coder_MVG_fuzzer:
-Timeout in graphicsmagick_coder_MVG_fuzzer&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-08-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_MVG_fuzzer: Unexpected-exit
-in DefaultFatalErrorHandler&quot;.
-(PrimitiveInfoRealloc): Implement more paranoid code related to
-primitive allocation.</li>
-</ul>
-</blockquote>
-<p>2019-08-16 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/render.c (DrawStrokePolygon): Handle case where
-TraceStrokePolygon() returns NULL. Addresses oss-fuzz 15516
-&quot;graphicsmagick/coder_MVG_fuzzer: ASSERT: primitive_info !=
-(PrimitiveInfo *) NULL&quot;.
-(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 &quot;graphicsmagick/coder_MVG_fuzzer: Timeout
-in graphicsmagick_coder_MVG_fuzzer&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-08-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/png.c (ReadMNGImage): Skip coalescing layers if there is
-only one layer. Fixes oss-fuzz 16274
-&quot;graphicsmagick/coder_MNG_fuzzer: Unexpected-exit in
-DefaultFatalErrorHandler&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-08-12 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick:coder_PNG8_fuzzer: Timeout in
-graphicsmagick_coder_PNG8_fuzzer&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-07-20 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;WriteOnePNGImage(): Fix saving to palette when image has an alpha
-channel but no color is marked as transparent&quot;.</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 &quot;Fix documentation
-typo&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-07-07 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/attribute.c (GenerateEXIFAttribute): Added range checks
-and tracing. Fixes oss-fuzz 14998
-&quot;graphicsmagick/coder_JPEG_fuzzer: Heap-buffer-overflow in
-Read32s&quot;. 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 &quot;graphicsmagick/coder_MPC_fuzzer:
-Out-of-memory in graphicsmagick_coder_MPC_fuzzer&quot;.</li>
-<li>doc/options.imdoc: Add notes about security hazards due to
-commands which support a <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</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:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>' syntax.</li>
-</ul>
-</blockquote>
-<p>2019-06-22 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/render.c (DrawImage): Assure that 'token' is initialized.
-Fixes oss-fuzz issue 14897 &quot;graphicsmagick/coder_MVG_fuzzer:
-Use-of-uninitialized-value in DrawImage&quot;.</li>
-<li>magick/animate.c (MagickXAnimateImages): Fix memory leak of
-scene_info.pixels.</li>
-<li>magick/display.c (MagickXDisplayImage): Fix heap overwrite of
-windows-&gt;image.name and windows-&gt;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 '&#64;' 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-19 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;jpg&quot;. Issue reported by Pro Turm.</li>
</ul>
</blockquote>
-<p>2019-06-10 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-18 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-16 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
-<li>magick/render.c (DrawImage): Terminate drawing if
-DrawCompositeMask() reports failure. Fixes oss-fuzz 12373
-&quot;graphicsmagick/coder_MVG_fuzzer: Timeout in
-graphicsmagick_coder_MVG_fuzzer&quot;.
-(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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-09 Fojtik Jaroslav &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</p>
<blockquote>
<ul class="simple">
-<li>magick/render.c (DrawImage): Only support <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</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:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>' syntax due to security concerns.
-Problem was reported to us by &quot;Battle Furry&quot; via the
-GraphicsMagick security mail alias on June 6, 2019.</li>
+<li>coders/wpg.c ZeroFillMissing data will never been triggered when
+y&gt;=image-&gt;rows.</li>
</ul>
</blockquote>
-<p>2019-06-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-09 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-09 Fojtik Jaroslav &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</p>
<blockquote>
<ul class="simple">
-<li>magick/nt_base.c: Search for n019003l.pfb (the &quot;Helvetica&quot;-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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-09 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_MVG_fuzzer:
+Integer-overflow in DrawPolygonPrimitive&quot;.</li>
+<li>coders/svg.c (ReadSVGImage): Fix dereference of NULL pointer
+when stopping image timer.</li>
</ul>
</blockquote>
-<p>2019-05-22 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-06 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
+&quot;graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
+ExpandBuffer&quot; and 20272 &quot;graphicsmagick:coder_PICT_fuzzer:
+Heap-buffer-overflow in DecodeImage&quot;.</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
+&quot;UnsupportedNumberOfRows&quot;. Patch was submitted by Thorsten
+Alteholz via private email on 2020-02-05.</li>
</ul>
</blockquote>
-<p>2019-05-20 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-04 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-02-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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) &lt; sizeof(size_t).</li>
</ul>
</blockquote>
-<p>2019-05-18 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-26 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Add braille
-image format support.</li>
+<li>magick/render.h (&quot;PrimitiveInfo&quot;): Change PrimitiveInfo
+coordinates from type 'unsigned long' to 'size_t'.</li>
</ul>
</blockquote>
-<p>2019-05-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-24 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-20 Fojtik Jaroslav &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-19 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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-&gt;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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-18 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/command.c: Make more data const.</li>
-</ul>
-</blockquote>
-<p>2019-05-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;heap-use-after-free in function ThrowLoggedException of
-magick/error.c&quot;.
-(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
-&quot;heap-buffer-overflow in ImportRLEPixels of coders/miff.c.</li>
-</ul>
-</blockquote>
-<p>2019-05-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>NEWS.txt: Update news.</li>
-<li>magick/utility.c (ExpandFilenames): Only expand <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>' to a
-list of arguments read from 'filename' if the path <a class="reference external" href="mailto:'&#37;&#52;&#48;filename">'<span>&#64;</span>filename</a>'
-does not exist. This fix is made based on an email posting to the
-'graphicsmagick-help' mailing list at SourceForge by &quot;Test User&quot;
-on Tue, 7 May 2019.</li>
-</ul>
-</blockquote>
-<p>2019-05-05 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Multiple crashes (FPE and
-invalid read) when processing XWD files&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Multiple crashes (FPE and invalid read) when
-processing XWD files&quot;. 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Multiple crashes (FPE and invalid read) when processing
-XWD files&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-13 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_PDB_fuzzer: Use-of-uninitialized-value in
-WritePDBImage&quot;, 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
-&quot;graphicsmagick/coder_MVG_fuzzer: Integer-overflow in DrawImage&quot;.</li>
-<li>magick/pixel_cache.c (SetNexus): Fix oss-fuzz issue 14208
-&quot;graphicsmagick/coder_MVG_fuzzer: Integer-overflow in SetNexus&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;heap-buffer-overflow in
-function WriteMATLABImage of coders/mat.c&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-10 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/pdb.c (WritePDBImage): Fix SourceForge issue #605
-&quot;heap-buffer-overflow in function WritePDBImage of coders/pdb.c&quot;.</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/wmf.c (ReadWMFImage): Reject WMF files with an empty
-bounding box. Fixes SourceForge issue #606 &quot;Division by Zero in
-coders/wmf.c&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-07 Fojtik Jaroslav &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/nt_base.c Fix a problem of finding ghostscript fonts.
-Variable &quot;font_dir&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;heap_buffer_overflow_WRITE in function WriteXWDImage of
-coders/xwd.c&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-05 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/svg.c (SVGStartElement): Fix stack buffer overflow while
-parsing quoted font family value. Fixes SourceForge issue #600
-&quot;stack-buffer-overflow in function SVGStartElement of
-coders/svg.c&quot;.</li>
-<li>coders/miff.c (ReadMIFFImage): Detect end of file while reading
-RLE packets. Fixes SourceForge issue #598 &quot;heap-buffer-overflow
-in function ReadMIFFImage of coders/miff.c&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/xwd.c (ReadXWDImage): Fix heap buffer overflow while
-reading DirectClass XWD file. Fixes SourceForge issue #597
-&quot;heap-buffer-overflow in function ReadXWDImage of coders/xwd.c&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-04-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/png.c (ReadMNGImage): Fix small buffer overflow (one
-PixelPacket) of image colormap. Fixes SourceForge issue #596
-&quot;heap-buffer-overflow in function CloneImage of magick/image.c&quot;.</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;memory leak in function ReadMPCImage of coders/mpc.c &quot;.</li>
-<li>magick/xwindow.c (MagickXGetWindowInfo): Deal with the unlikely
-case that the memory allocation for window-&gt;segment_info
-fails. Fixes SourceForge #595 &quot;use allocate memory before null
-check&quot; 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 &quot;use
-allocate memory before null check&quot; as pertains to
-magick/segment.c.</li>
-<li>coders/pdb.c (ReadPDBImage): Fix use of allocated memory before
-null check. Fixes SourceForge #595 &quot;use allocate memory before
-null check&quot; as pertains to coders/pdb.c.</li>
-</ul>
-</blockquote>
-<p>2019-03-30 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick/coder_MAT_fuzzer:
-Direct-leak in ReadMATImage&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-06 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_MAT_fuzzer: Use-of-uninitialized-value in
-InsertComplexFloatRow&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-04 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/txt.c (ReadTXTImage): Don't start new line if x_max &lt;
-x_min. Avoids calling SetImagePixels() with a width of zero.
-Related to oss-fuzz 13521 &quot;graphicsmagick/coder_TEXT_fuzzer:
-Floating-point-exception in SetNexus&quot;. (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
-&quot;graphicsmagick/coder_TEXT_fuzzer: Floating-point-exception in
-SetNexus&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_MVG_fuzzer: Integer-overflow in
-SetNexus&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-03-02 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Unexpected end-of-file&quot; if reader encounters end of
-file while reading header rows. Addresses oss-fuzz 7981
-&quot;graphicsmagick/coder_TOPOL_fuzzer: Use-of-uninitialized-value in
-InsertRow&quot;. (Credit to OSS-Fuzz)</li>
-<li>coders/mat.c (ReadMATImage): Report a corrupt image exception
-&quot;Unexpected end-of-file&quot; if reader encounters end of file while
-reading scanlines. Also added some helpful traces. Hopefully
-addresses oss-fuzz 13445 &quot;graphicsmagick/coder_MAT_fuzzer:
-Use-of-uninitialized-value in IsGrayImage&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-26 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>magick/image.h (&quot;C&quot;): Include as &quot;magick/image-private.h&quot; as the
-other headers are.
-(&quot;C&quot;): Include &quot;magick/image-private.h&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_MIFF_fuzzer: Timeout in
-graphicsmagick_coder_MIFF_fuzzer&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-17 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_MVG_fuzzer: Heap-buffer-overflow in
-DrawDashPolygon&quot;. 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;Heap buffer overflow in
-DrawDashPolygon when parsing SVG images&quot;.
-(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 &quot;Unreasonable dimensions&quot; delivered yesterday
-was flawed since magick_rows and magick_columns are only set if a
-desired image size was provided. Fixes SourceForge issue 592
-&quot;Non-malicious JPEG file fails with &quot;Unreasonable dimensions&quot;&quot;.</li>
-<li>coders/tiff.c (ReadTIFFImage): Only disassociate alpha channel
-for images where photometic is PHOTOMETRIC_RGB. Fixes oss-fuzz
-13115 &quot;graphicsmagick/coder_PTIF_fuzzer:
-Use-of-uninitialized-value in DisassociateAlphaRegion&quot;. (Credit to
-OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-15 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/jpeg.c (ReadJPEGImage): Base test for &quot;Unreasonable
-dimensions&quot; on original JPEG dimensions and not the scaled
-dimensions. Fixes SourceForge issue 593 &quot;gm convert: Insufficient
-image data in file when hinting input image&quot;.</li>
-</ul>
-</blockquote>
-<p>2019-02-13 Troy Patteson &lt;<a class="reference external" href="mailto:troyp&#37;&#52;&#48;ieee&#46;org">troyp<span>&#64;</span>ieee<span>&#46;</span>org</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick/coder_PTIF_fuzzer:
-Use-of-uninitialized-value in DisassociateAlphaRegion&quot;. (Credit to
-OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
-<blockquote>
-<ul class="simple">
-<li>coders/pdf.c (WritePDFImage): Make sure to free 'xref' before
-returning. Similar to ImageMagick CVE-2019-7397 &quot;In ImageMagick
-before 7.0.8-25, several memory leaks exist in WritePDFImage in
-coders/pdf.c.&quot;. Thanks to Petr Gajdos for bringing this issue to
-our attention.</li>
-</ul>
-</blockquote>
-<p>2019-02-10 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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-&gt;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
-&quot;graphicsmagick/enhance_fuzzer: Out-of-memory in
-graphicsmagick_enhance_fuzzer&quot;. (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
-&quot;graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
-VerticalFilter&quot;.</li>
-<li>coders/dpx.c (AttributeToString): Eliminate clang
-&quot;-Wstring-plus-int&quot; warning observed in oss-fuzz build.</li>
-<li>coders/cineon.c (AttributeToString): Eliminate clang
-&quot;-Wstring-plus-int&quot; warning observed in oss-fuzz build.</li>
-</ul>
-</blockquote>
-<p>2019-02-09 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/coder_PICT_fuzzer: Heap-buffer-overflow in
-ExpandBuffer&quot;. (Credit to OSS-Fuzz)</li>
-<li>coders/wpg.c (ReadWPGImage): Assure that all colormap entries
-are initialized. Fixes oss-fuzz 12614
-&quot;graphicsmagick/enhance_fuzzer: Use-of-uninitialized-value in
-EnhanceImage&quot;. (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
-&quot;graphicsmagick/coder_PTIF_fuzzer: Use-of-uninitialized-value in
-ExportGrayQuantumType&quot;. (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 &quot;graphicsmagick/coder_MIFF_fuzzer:
-Use-of-uninitialized-value in RGBTransformPackets&quot;. (Credit to
-OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-08 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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
-&quot;graphicsmagick/enhance_fuzzer: Out-of-memory in
-graphicsmagick_enhance_fuzzer&quot;. (Credit to OSS-Fuzz)</li>
-</ul>
-</blockquote>
-<p>2019-02-03 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;heap-buffer-overflow in ReadBMPImage of bmp.c&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;graphicsmagick:coder_PICT_fuzzer:
+Heap-buffer-overflow in ExpandBuffer&quot; and oss-fuzz issue 20048
+&quot;graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
+DecodeImage&quot;. 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-12 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
-<li>coders/webp.c (WriteWEBPImage): Patch by Przemysław Sobala to
-support WebP 'use_sharp_yuv' option (&quot;if needed, use sharp (and
-slow) RGB-&gt;YUV conversion&quot;) 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<p>2020-01-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
<blockquote>
<ul class="simple">
-<li>magick/pixel_cache.c (SetNexus): Merge IsNexusInCore()
-implementation code into SetNexus() and add check for if
-cache_info-&gt;pixels is null. Fixes SourceForge issue #588 &quot;Bug in
-IsNexusInCore()&quot;.</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 &quot;Identify lack of data (no Exif) in RAW formats&quot;.</li>
+<li>coders/histogram.c (WriteHISTOGRAMImage): Histogram coder was
+relying on the previously removed '&#64;' file inclusion feature to
+insert the histogram comment text. Write a PseudoClass MIFF image
+with RLE compression. Fixes SourceForge issue #622 &quot;Histogram
+produces incorrect color table attribute &quot;.</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &quot;warning: comparison is always false
+due to limited range of data type&quot;.</li>
+</ul>
+</blockquote>
+<p>2020-01-05 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li>coders/sfw.c (ReadSFWImage): Restore a DestroyImage() statement
+which was accidentally deleted by recent edits. Fixes oss-fuzz
+&quot;Issue 19819 in oss-fuzz: graphicsmagick:coder_SFW_fuzzer:
+Indirect-leak in AllocateImage&quot;.</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 &quot;Assertion in WriteBlob at magick/blob.c:4937&quot; 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
+&quot;heap-buffer-overflow in EncodeImage at coders/pict.c:1114&quot; 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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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 &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;seznam&#46;cz">JaFojtik<span>&#64;</span>seznam<span>&#46;</span>cz</a>&gt;</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 &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</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>
diff --git a/www/Changelog.rst b/www/Changelog.rst
index d917278..03be529 100644
--- a/www/Changelog.rst
+++ b/www/Changelog.rst
@@ -1,1294 +1,324 @@
-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.
diff --git a/www/Changes.html b/www/Changes.html
index 69c6817..25cf8c2 100644
--- a/www/Changes.html
+++ b/www/Changes.html
@@ -3,7 +3,7 @@
<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" />
@@ -43,7 +43,8 @@
<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>
@@ -65,7 +66,7 @@
</ul>
</blockquote>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
diff --git a/www/Changes.rst b/www/Changes.rst
index 15c53ef..f740b7b 100644
--- a/www/Changes.rst
+++ b/www/Changes.rst
@@ -21,7 +21,8 @@ GraphicsMagick Change Logs
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
@@ -43,6 +44,8 @@ GraphicsMagick Change Logs
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)
@@ -86,4 +89,4 @@ The following are the ``GraphicsMagick`` change logs since 2001:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/Copyright.html b/www/Copyright.html
index 07710dd..b6fa70e 100644
--- a/www/Copyright.html
+++ b/www/Copyright.html
@@ -51,7 +51,7 @@ to changing one line of code.</em>]</blockquote>
<li><p class="first">In November 2002, the GraphicsMagick Group created GraphicsMagick
from ImageMagick Studio's ImageMagick and applied the &quot;MIT&quot; 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 &quot;Software&quot;), to deal in the Software without restriction,
diff --git a/www/FAQ.html b/www/FAQ.html
index 29e240a..591d2ba 100644
--- a/www/FAQ.html
+++ b/www/FAQ.html
@@ -792,7 +792,7 @@ seaworld.jpg JPEG 1530x1020+0+0 DirectClass 8-bit 204.0K 0.000u 0:01
</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>
diff --git a/www/FAQ.rst b/www/FAQ.rst
index 976cd95..76ddf88 100644
--- a/www/FAQ.rst
+++ b/www/FAQ.rst
@@ -773,4 +773,4 @@ but with -verbose it can report on a large number of properties.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/GraphicsMagick.html b/www/GraphicsMagick.html
index bdb391e..41432db 100644
--- a/www/GraphicsMagick.html
+++ b/www/GraphicsMagick.html
@@ -1538,6 +1538,17 @@ to an different interpretation of the standard, or getting the wires
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=&lt;value&gt;</dt>
<dd>Specify the compression factor to use while writing JPEG-2000
files. The compression factor is the reciprocal of the compression
@@ -6447,7 +6458,7 @@ color="#00B04F"><font size="+1">
<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>
@@ -6459,6 +6470,6 @@ http://www.GraphicsMagick.org/Copyright.html for details.
[<a href="index.html">Home</a>] [<a href="utilities.html">Utilities Index</a>]
<BR>
-<p align=center <a href="Copyright.html">Copyright &#169; GraphicsMagick Group 2002 - 2018</a></p></td>
+<p align=center <a href="Copyright.html">Copyright &#169; GraphicsMagick Group 2002 - 2020</a></p></td>
</tr></table>
</body></html>
diff --git a/www/Hg.html b/www/Hg.html
index e2326c2..015f99f 100644
--- a/www/Hg.html
+++ b/www/Hg.html
@@ -255,7 +255,7 @@ notified by email of changes when they occur.</p>
<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 &quot;My&quot; or &quot;Their&quot; 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>
diff --git a/www/Hg.rst b/www/Hg.rst
index e2757a0..e1dc3f4 100644
--- a/www/Hg.rst
+++ b/www/Hg.rst
@@ -239,4 +239,4 @@ Mercurial Topics
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2012 - 2019
+Copyright |copy| GraphicsMagick Group 2012 - 2020
diff --git a/www/INSTALL-unix.html b/www/INSTALL-unix.html
index 3f67099..daf59d5 100644
--- a/www/INSTALL-unix.html
+++ b/www/INSTALL-unix.html
@@ -3,8 +3,8 @@
<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>
@@ -32,8 +32,8 @@
<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. -->
@@ -47,7 +47,7 @@
</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 &amp; MSYS</a><ul>
+<li><a class="reference internal" href="#building-under-mingw-msys2" id="id6">Building under MinGW &amp; 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>
@@ -902,10 +902,25 @@ be possible to catch C++ exceptions thrown from DLLs. The test suite
<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 &amp; MSYS</a></h1>
-<p>GraphicsMagick may be built using the free MinGW (&quot;Minimalistic GNU for
-Windows&quot;) package, available from</p>
+<div class="section" id="building-under-mingw-msys2">
+<h1><a class="toc-backref" href="#id6">Building under MinGW &amp; 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
+(&quot;Minimalistic GNU for Windows&quot;) package, available from</p>
<blockquote>
<a class="reference external" href="http://www.mingw.org/">http://www.mingw.org/</a></blockquote>
<p>or from</p>
@@ -1135,7 +1150,7 @@ the developer's environment environment and your own may include the
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>
diff --git a/www/INSTALL-unix.rst b/www/INSTALL-unix.rst
index fa8e0d6..8fa01ca 100644
--- a/www/INSTALL-unix.rst
+++ b/www/INSTALL-unix.rst
@@ -2,9 +2,9 @@
.. 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:
@@ -818,11 +818,30 @@ be possible to catch C++ exceptions thrown from DLLs. The test suite
``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/
@@ -1083,4 +1102,4 @@ libraries.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/INSTALL-windows.html b/www/INSTALL-windows.html
index a03e72c..c69dabb 100644
--- a/www/INSTALL-windows.html
+++ b/www/INSTALL-windows.html
@@ -60,7 +60,7 @@
<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>
@@ -94,8 +94,8 @@ Fonts&quot;) to support the standard set of Adobe Postscript fonts like
&quot;Helvetica&quot; and &quot;Times Roman&quot; 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 &quot;C:Program Filesgsfonts&quot; or &quot;C:Program
-Filesgsgs9.27fonts&quot;).</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
&quot;fonts/n019003l.pfb&quot; file in each path until it finds a match.</p>
@@ -179,23 +179,17 @@ options:</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>&quot;Creating a desktop icon&quot; and &quot;Update the executable search path&quot;
are selected by default. The remaining options default to
un-selected. Select the options you prefer.</p>
-<p>Think twice before selecting &quot;<em>Associate supported file extensions with
-GraphicsMagick</em>&quot; 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 &quot;<em>Associate supported file extensions
+with GraphicsMagick</em>&quot; 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 &quot;<em>Next&gt;</em>&quot; to continue.</p>
</blockquote>
</div>
@@ -254,13 +248,9 @@ functionality. Always remove an installed GraphicsMagick via its
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 &quot;<em>Uninstall</em>&quot; 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 &quot;<em>Add or Remove Programs</em>&quot; area of the Windows Control Panel. Select
-the GraphicsMagick package from the list, and click on &quot;<em>Change/Remove</em>&quot;
-to uninstall it.</p>
+<p>GraphicsMagick should be removed via the &quot;<em>Add or Remove Programs</em>&quot;
+area of the Windows Control Panel. Select the GraphicsMagick package
+from the list, and click on &quot;<em>Change/Remove</em>&quot; to uninstall it.</p>
</blockquote>
</div>
<div class="section" id="use-from-another-package-or-program">
@@ -338,9 +328,10 @@ installed</td>
<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>
@@ -353,21 +344,21 @@ then adjust the settings for the module which failed and disable
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 &quot;configure&quot; 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">
@@ -405,9 +396,9 @@ distribution is built using #1 from above with the X11 libraries
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 &quot;Release&quot; 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 &quot;Release&quot; under the</p>
<blockquote>
&quot;Build..., Set Active Configuration...&quot; menu.</blockquote>
<p>Build and execute the configure program and follow the on-screen
@@ -788,7 +779,7 @@ double-clicking from Windows Explorer.<ol class="loweralpha">
<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>
diff --git a/www/INSTALL-windows.rst b/www/INSTALL-windows.rst
index 07bf8b0..93460e6 100644
--- a/www/INSTALL-windows.rst
+++ b/www/INSTALL-windows.rst
@@ -39,8 +39,8 @@ Prerequisites
"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
@@ -130,24 +130,17 @@ Select Additional Tasks
* 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.
@@ -207,14 +200,9 @@ Uninstall
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
-----------------------------------
@@ -266,9 +254,10 @@ Applicability
-------------
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
---------------
@@ -281,16 +270,16 @@ 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.
@@ -299,8 +288,8 @@ Windows XP, Vista, 7 Visual C++ 6.0 through 14.0 Compilation
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
@@ -349,9 +338,9 @@ Windows XP, Vista, 7 Visual C++ 6.0 through 14.0 Compilation
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.
@@ -779,4 +768,4 @@ Windows Distribution Build Procedure
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/ImageMagickObject.html b/www/ImageMagickObject.html
index b09f9a9..398e8b7 100644
--- a/www/ImageMagickObject.html
+++ b/www/ImageMagickObject.html
@@ -126,7 +126,7 @@ working.</p>
<p>Sometime in the future, MagickCMD may assume the place of gm.exe in the
&quot;utils&quot; 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>
diff --git a/www/ImageMagickObject.rst b/www/ImageMagickObject.rst
index 20cf034..dbcc5c8 100644
--- a/www/ImageMagickObject.rst
+++ b/www/ImageMagickObject.rst
@@ -127,4 +127,4 @@ Sometime in the future, MagickCMD may assume the place of gm.exe in the
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/Magick++/Blob.html b/www/Magick++/Blob.html
index 7fa1825..e0f4d86 100644
--- a/www/Magick++/Blob.html
+++ b/www/Magick++/Blob.html
@@ -115,7 +115,7 @@ public:
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
diff --git a/www/Magick++/Blob.rst b/www/Magick++/Blob.rst
index 5c45ee9..0e1c2a3 100644
--- a/www/Magick++/Blob.rst
+++ b/www/Magick++/Blob.rst
@@ -89,4 +89,4 @@ The following is the definition of the Magick::Blob class::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/CoderInfo.html b/www/Magick++/CoderInfo.html
index 63b5970..fbce6ab 100644
--- a/www/Magick++/CoderInfo.html
+++ b/www/Magick++/CoderInfo.html
@@ -114,7 +114,7 @@ namespace Magick
};
}
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
diff --git a/www/Magick++/CoderInfo.rst b/www/Magick++/CoderInfo.rst
index d0260df..8ac1d0a 100644
--- a/www/Magick++/CoderInfo.rst
+++ b/www/Magick++/CoderInfo.rst
@@ -85,4 +85,4 @@ The definition of class 'Magick::CoderInfo' is::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Color.html b/www/Magick++/Color.html
index 9447bd4..54b52ca 100644
--- a/www/Magick++/Color.html
+++ b/www/Magick++/Color.html
@@ -377,7 +377,7 @@ public:
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
diff --git a/www/Magick++/Color.rst b/www/Magick++/Color.rst
index 6209288..c9d3b42 100644
--- a/www/Magick++/Color.rst
+++ b/www/Magick++/Color.rst
@@ -313,4 +313,4 @@ television transmission). Argument ranges are
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Drawable.html b/www/Magick++/Drawable.html
index 5337504..b29da8d 100644
--- a/www/Magick++/Drawable.html
+++ b/www/Magick++/Drawable.html
@@ -1117,7 +1117,7 @@ PathArcRel ( const PathArcArgs &amp;coordinates_ );
<pre class="literal-block">
PathArcRel ( const PathArcArgsList &amp;coordinates_ );
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</div>
diff --git a/www/Magick++/Drawable.rst b/www/Magick++/Drawable.rst
index 4538f92..65279be 100644
--- a/www/Magick++/Drawable.rst
+++ b/www/Magick++/Drawable.rst
@@ -1051,4 +1051,4 @@ Draw multiple arc segments::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Enumerations.html b/www/Magick++/Enumerations.html
index fdacec8..ab813b0 100644
--- a/www/Magick++/Enumerations.html
+++ b/www/Magick++/Enumerations.html
@@ -1314,7 +1314,7 @@ enumeration may be specified for a wildcard match.</p>
</tr>
</tbody>
</table>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
diff --git a/www/Magick++/Enumerations.rst b/www/Magick++/Enumerations.rst
index 4e9c710..d4dd4f3 100644
--- a/www/Magick++/Enumerations.rst
+++ b/www/Magick++/Enumerations.rst
@@ -679,4 +679,4 @@ enumeration may be specified for a wildcard match.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Exception.html b/www/Magick++/Exception.html
index fde01e1..864ff47 100644
--- a/www/Magick++/Exception.html
+++ b/www/Magick++/Exception.html
@@ -294,7 +294,7 @@ subordinate program is missing (but is needed).</td>
</table>
<p>Note that <em>ErrorMissingDelegate</em> is a &quot;catch-all&quot; 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>
diff --git a/www/Magick++/Exception.rst b/www/Magick++/Exception.rst
index 4c1a872..85b3f66 100644
--- a/www/Magick++/Exception.rst
+++ b/www/Magick++/Exception.rst
@@ -180,4 +180,4 @@ GraphicsMagick is unable to figure out how to open the file.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/FormatCharacters.html b/www/Magick++/FormatCharacters.html
index fb8563d..c0383a7 100644
--- a/www/Magick++/FormatCharacters.html
+++ b/www/Magick++/FormatCharacters.html
@@ -101,7 +101,7 @@ table:</p>
</tr>
</tbody>
</table>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
diff --git a/www/Magick++/FormatCharacters.rst b/www/Magick++/FormatCharacters.rst
index aa1a096..0e260e8 100644
--- a/www/Magick++/FormatCharacters.rst
+++ b/www/Magick++/FormatCharacters.rst
@@ -38,4 +38,4 @@ table:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Geometry.html b/www/Magick++/Geometry.html
index 813f0bc..5575e6e 100644
--- a/www/Magick++/Geometry.html
+++ b/www/Magick++/Geometry.html
@@ -420,7 +420,7 @@ public:
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
diff --git a/www/Magick++/Geometry.rst b/www/Magick++/Geometry.rst
index dff6f27..c4c6647 100644
--- a/www/Magick++/Geometry.rst
+++ b/www/Magick++/Geometry.rst
@@ -236,4 +236,4 @@ The following is the definition of the Magick::Geometry class::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Image.html b/www/Magick++/Image.html
index aaa6d72..ad00ae4 100644
--- a/www/Magick++/Image.html
+++ b/www/Magick++/Image.html
@@ -3005,7 +3005,7 @@ buffer or file. Used to support image encoders:</p>
void writePixels ( const QuantumType quantum_,
unsigned char *destination_ )
</pre>
-<p>Copyright © <a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">Bob Friesenhahn</a> 1999 - 2019</p>
+<p>Copyright © <a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">Bob Friesenhahn</a> 1999 - 2020</p>
</div>
</div>
</div>
diff --git a/www/Magick++/Image.rst b/www/Magick++/Image.rst
index 9975b7c..820d14d 100644
--- a/www/Magick++/Image.rst
+++ b/www/Magick++/Image.rst
@@ -2823,4 +2823,4 @@ buffer or file. Used to support image encoders::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| `Bob Friesenhahn`_ 1999 - 2019
+Copyright |copy| `Bob Friesenhahn`_ 1999 - 2020
diff --git a/www/Magick++/ImageDesign.html b/www/Magick++/ImageDesign.html
index caad12a..1dcf0a9 100644
--- a/www/Magick++/ImageDesign.html
+++ b/www/Magick++/ImageDesign.html
@@ -49,7 +49,7 @@ reference count on the old image becomes zero, then the associated
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>
diff --git a/www/Magick++/ImageDesign.rst b/www/Magick++/ImageDesign.rst
index 31ca511..d22d15e 100644
--- a/www/Magick++/ImageDesign.rst
+++ b/www/Magick++/ImageDesign.rst
@@ -24,4 +24,4 @@ effective) form of garbage collection.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Montage.html b/www/Magick++/Montage.html
index 9287885..91d2ced 100644
--- a/www/Magick++/Montage.html
+++ b/www/Magick++/Montage.html
@@ -201,7 +201,7 @@ public:
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
diff --git a/www/Magick++/Montage.rst b/www/Magick++/Montage.rst
index 22dfda9..dcb534b 100644
--- a/www/Magick++/Montage.rst
+++ b/www/Magick++/Montage.rst
@@ -197,4 +197,4 @@ The following is the definition of the Magick::MontageFramed class::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/PixelPacket.html b/www/Magick++/PixelPacket.html
index fc2c480..5d0c93b 100644
--- a/www/Magick++/PixelPacket.html
+++ b/www/Magick++/PixelPacket.html
@@ -132,7 +132,7 @@ are shown in the following table:</p>
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>
diff --git a/www/Magick++/PixelPacket.rst b/www/Magick++/PixelPacket.rst
index 369f586..21e7043 100644
--- a/www/Magick++/PixelPacket.rst
+++ b/www/Magick++/PixelPacket.rst
@@ -54,4 +54,4 @@ the assocated IndexPacket.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/Pixels.html b/www/Magick++/Pixels.html
index d731526..704d84e 100644
--- a/www/Magick++/Pixels.html
+++ b/www/Magick++/Pixels.html
@@ -164,7 +164,7 @@ public:
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
diff --git a/www/Magick++/Pixels.rst b/www/Magick++/Pixels.rst
index b9e8277..b06399f 100644
--- a/www/Magick++/Pixels.rst
+++ b/www/Magick++/Pixels.rst
@@ -145,4 +145,4 @@ The following is the definition of the Magick::Pixels class::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/TypeMetric.html b/www/Magick++/TypeMetric.html
index 29dc5de..1810dc2 100644
--- a/www/Magick++/TypeMetric.html
+++ b/www/Magick++/TypeMetric.html
@@ -89,7 +89,7 @@ public:
};
</pre>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</body>
</html>
diff --git a/www/Magick++/TypeMetric.rst b/www/Magick++/TypeMetric.rst
index d37474d..a564f0e 100644
--- a/www/Magick++/TypeMetric.rst
+++ b/www/Magick++/TypeMetric.rst
@@ -64,4 +64,4 @@ The following is the definition of the Magick::TypeMetric class::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Magick++/index.html b/www/Magick++/index.html
index 7abadbd..2b77271 100644
--- a/www/Magick++/index.html
+++ b/www/Magick++/index.html
@@ -231,7 +231,7 @@ initialize GraphicsMagick will result in an application crash.</p>
<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&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">Bob Friesenhahn</a>.</p>
-<p>Copyright © Bob Friesenhahn 1999 - 2019</p>
+<p>Copyright © Bob Friesenhahn 1999 - 2020</p>
</div>
</div>
</body>
diff --git a/www/Magick++/index.rst b/www/Magick++/index.rst
index 7cce025..9857ceb 100644
--- a/www/Magick++/index.rst
+++ b/www/Magick++/index.rst
@@ -222,4 +222,4 @@ regarding usage should be directed to `Bob Friesenhahn`_.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| Bob Friesenhahn 1999 - 2019
+Copyright |copy| Bob Friesenhahn 1999 - 2020
diff --git a/www/Makefile.am b/www/Makefile.am
index 2131fa1..ce2fd32 100644
--- a/www/Makefile.am
+++ b/www/Makefile.am
@@ -54,6 +54,7 @@ RST2HTML_TARGETS = \
$(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 \
@@ -170,6 +171,7 @@ WWW_HTML_FILES = \
$(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 \
@@ -272,6 +274,9 @@ CHANGELOG2RST=$(top_srcdir)/scripts/changelog2rst.sh
$(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) < $^ > $@
diff --git a/www/NEWS.html b/www/NEWS.html
index 2f1297b..56b1fbf 100644
--- a/www/NEWS.html
+++ b/www/NEWS.html
@@ -3,7 +3,7 @@
<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>
@@ -38,7 +38,7 @@
<!-- -*- 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>
@@ -47,48 +47,159 @@ every release, it is recommended to update to the most current
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
+&quot;graphicsmagick&quot;. Issues are available for anyone to view and
+duplicate if they have been in &quot;Verified&quot; status for 30 days, or if
+they have been in &quot;New&quot; 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 &quot;gradient:direction&quot; 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++
@@ -205,7 +316,7 @@ without &quot;administrator&quot; privileges.</li>
</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++
@@ -289,7 +400,7 @@ color is marked as transparent.</li>
</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++
@@ -506,7 +617,7 @@ advance on the text string using TranslateText() if need be.</li>
</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
@@ -598,7 +709,7 @@ forever.</li>
</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>
@@ -677,7 +788,7 @@ compilation via the MaxWarningCount definition in coders/jpeg.c.</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>
@@ -771,7 +882,7 @@ to the efforts of Greg Wolfe.</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>
@@ -850,7 +961,7 @@ renaming.</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>
@@ -1008,7 +1119,7 @@ removed from shared library or DLL namespace.</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>
@@ -1111,7 +1222,7 @@ source tree. All of these depend on proprietary components.</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>
@@ -1188,7 +1299,7 @@ seconds precision in in elapsed time output.</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
@@ -1310,7 +1421,7 @@ delegate.mgk file.</li>
</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)
@@ -1375,7 +1486,7 @@ available in recent Ghostscript.</li>
</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
@@ -1484,7 +1595,7 @@ The STL function-object equivalent of the deprecated method is removed
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">
@@ -1721,7 +1832,7 @@ for an RGB image.</li>
</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">
@@ -1885,7 +1996,7 @@ optimizations since their implementations have been problematic.</li>
</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">
@@ -2044,7 +2155,7 @@ multiple Ghostscript versions.</li>
</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">
@@ -2158,7 +2269,7 @@ color is in the same colorspace as the image.</li>
</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">
@@ -2245,7 +2356,7 @@ will search for firefox, google-chrome, mozilla (in that order).</li>
</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">
@@ -2310,7 +2421,7 @@ include OpenMP support for it by default.</li>
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">
@@ -2384,7 +2495,7 @@ anticipate the automatic file numbering.</li>
</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">
@@ -2441,7 +2552,7 @@ was using the filter setting from the Image structure instead.</li>
</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>
@@ -2595,7 +2706,7 @@ static builds.</li>
</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">
@@ -2639,7 +2750,7 @@ would be written.</li>
</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">
@@ -2691,7 +2802,7 @@ opaque.</li>
</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">
@@ -2738,7 +2849,7 @@ scene number substition is desired in the output file names.</li>
</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">
@@ -2798,7 +2909,7 @@ image in the list if it is not already opaque.</li>
</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">
@@ -2952,7 +3063,7 @@ distributed.</li>
</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">
@@ -3042,7 +3153,7 @@ structure is clean prior to invoking a function.</li>
</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">
@@ -3176,7 +3287,7 @@ progressive JPEG.</li>
</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">
@@ -3215,7 +3326,7 @@ not available.</li>
</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">
@@ -3254,7 +3365,7 @@ not available.</li>
</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">
@@ -3286,7 +3397,7 @@ used in a directory containing a million files.</li>
</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">
@@ -3320,7 +3431,7 @@ process the opacity channel unless the image has one.</li>
</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">
@@ -3358,7 +3469,7 @@ encoding is used via jpeg:optimize-coding define.</li>
</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">
@@ -3566,7 +3677,7 @@ dither any named channel.</li>
</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">
@@ -3822,7 +3933,7 @@ distributed).</li>
</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">
@@ -4062,7 +4173,7 @@ logging system.</li>
</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">
diff --git a/www/OpenMP.html b/www/OpenMP.html
index fcfae52..1102dfd 100644
--- a/www/OpenMP.html
+++ b/www/OpenMP.html
@@ -3,7 +3,7 @@
<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>
@@ -199,7 +199,7 @@ commands also accept a <tt class="docutils literal"><span class="pre">-limit</sp
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
diff --git a/www/OpenMP.rst b/www/OpenMP.rst
index 9f04f94..4a40bca 100644
--- a/www/OpenMP.rst
+++ b/www/OpenMP.rst
@@ -190,7 +190,7 @@ specifying the maximum number of threads to use.
--------------------------------------------------------------------------
-| 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
diff --git a/www/README.html b/www/README.html
index 3660990..3705228 100644
--- a/www/README.html
+++ b/www/README.html
@@ -415,7 +415,7 @@ likely that other purposes will be found for Zstd.</p>
</li>
</ul>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
diff --git a/www/api/api.html b/www/api/api.html
index b0d7c88..0e7a8e3 100644
--- a/www/api/api.html
+++ b/www/api/api.html
@@ -280,7 +280,7 @@ out.miff'.</p>
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>
diff --git a/www/api/api.rst b/www/api/api.rst
index 03a64ca..694e1ad 100644
--- a/www/api/api.rst
+++ b/www/api/api.rst
@@ -301,4 +301,4 @@ your program will compile and run.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/api/attribute.html b/www/api/attribute.html
index 0c25af0..92bec54 100644
--- a/www/api/attribute.html
+++ b/www/api/attribute.html
@@ -3,7 +3,7 @@
<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>
diff --git a/www/api/image.html b/www/api/image.html
index 9485170..e9ad14f 100644
--- a/www/api/image.html
+++ b/www/api/image.html
@@ -476,17 +476,17 @@ void DestroyImageInfo( <a class="reference external" href="../api/types.html#ima
<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">
diff --git a/www/api/magick.html b/www/api/magick.html
index 9f1461a..ef4fbb3 100644
--- a/www/api/magick.html
+++ b/www/api/magick.html
@@ -39,25 +39,26 @@
<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">
@@ -82,7 +83,7 @@ DestroyMagick( void );
</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">
@@ -99,7 +100,7 @@ void DestroyMagickInfo( <a class="reference external" href="../api/types.html#ma
</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">
@@ -116,7 +117,7 @@ void DestroyMagickInfoList( void );
</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">
@@ -140,7 +141,7 @@ const char *GetImageMagick( const unsigned char *magick, const size_t length );
</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">
@@ -171,7 +172,7 @@ const <a class="reference external" href="../api/types.html#magickinfo">MagickIn
</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">
@@ -200,7 +201,7 @@ structures based on pointers in the array!</p>
</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">
@@ -209,12 +210,16 @@ InitializeMagick( const char *path );
</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 );
@@ -222,20 +227,58 @@ 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>
@@ -253,14 +296,14 @@ conflicts with a logical drive.</dd>
</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>
@@ -277,14 +320,14 @@ MagickPassFail ListMagickInfo( FILE *file, <a class="reference external" href=".
</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>
@@ -302,14 +345,14 @@ MagickPassFail ListModuleMap( FILE *file, <a class="reference external" href="..
</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
@@ -327,14 +370,14 @@ char *MagickToMime( const char *magick );
</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,
@@ -353,14 +396,14 @@ supports native in-memory I/O, and a brief description of the format.</p>
</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)
@@ -376,14 +419,14 @@ void PanicDestroyMagick( void );
</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>
@@ -403,14 +446,14 @@ with the MagickInfo structure.</dd>
</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
diff --git a/www/api/pixel_cache.html b/www/api/pixel_cache.html
index d62765a..fc53979 100644
--- a/www/api/pixel_cache.html
+++ b/www/api/pixel_cache.html
@@ -3,7 +3,7 @@
<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>
diff --git a/www/api/transform.html b/www/api/transform.html
index 2ec7ba4..bc9ed7b 100644
--- a/www/api/transform.html
+++ b/www/api/transform.html
@@ -368,8 +368,8 @@ region of the image to shave.</dd>
<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">
@@ -380,8 +380,8 @@ geometry specification. If the operation fails, the original image handle
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>
diff --git a/www/api/types.html b/www/api/types.html
index eb04c45..ac7104b 100644
--- a/www/api/types.html
+++ b/www/api/types.html
@@ -2837,7 +2837,7 @@ typedef struct _XResourceInfo
} XResourceInfo;
</pre>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
diff --git a/www/api/types.rst b/www/api/types.rst
index d4a1329..013253a 100644
--- a/www/api/types.rst
+++ b/www/api/types.rst
@@ -2070,4 +2070,4 @@ MagickXResourceInfo
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/authors.html b/www/authors.html
index 34d1784..30b5711 100644
--- a/www/authors.html
+++ b/www/authors.html
@@ -199,7 +199,7 @@ Wireless Access Protocol.</dd>
</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
diff --git a/www/authors.rst b/www/authors.rst
index 47aa6a9..3495af4 100644
--- a/www/authors.rst
+++ b/www/authors.rst
@@ -198,7 +198,7 @@ Mike Edmonds
.. |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
diff --git a/www/benchmarks.html b/www/benchmarks.html
index 5ca478e..4f130ee 100644
--- a/www/benchmarks.html
+++ b/www/benchmarks.html
@@ -170,7 +170,7 @@ done 2&gt;&amp;1
</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
diff --git a/www/benchmarks.rst b/www/benchmarks.rst
index 8ca5def..dcec20b 100644
--- a/www/benchmarks.rst
+++ b/www/benchmarks.rst
@@ -141,7 +141,7 @@ Here is the simple benchmark script::
--------------------------------------------------------------------------
-| 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
diff --git a/www/configure-target-setup.png b/www/configure-target-setup.png
index 2a21cef..4968ff6 100644
--- a/www/configure-target-setup.png
+++ b/www/configure-target-setup.png
Binary files differ
diff --git a/www/contribute.html b/www/contribute.html
index deedbe8..35610df 100644
--- a/www/contribute.html
+++ b/www/contribute.html
@@ -114,7 +114,7 @@ explore.</li>
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>
diff --git a/www/contribute.rst b/www/contribute.rst
index fb4e8c5..37c49f9 100644
--- a/www/contribute.rst
+++ b/www/contribute.rst
@@ -107,4 +107,4 @@ the GraphicsMagick project:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/download.html b/www/download.html
index 6c4b836..c81cf53 100644
--- a/www/download.html
+++ b/www/download.html
@@ -96,7 +96,7 @@ Visual C++ workspace) may be found here.</blockquote>
<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>
diff --git a/www/download.rst b/www/download.rst
index faf9d40..8217d20 100644
--- a/www/download.rst
+++ b/www/download.rst
@@ -86,4 +86,4 @@ Here are some known download sites for GraphicsMagick:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/formats.html b/www/formats.html
index f9db6c9..fb95da7 100644
--- a/www/formats.html
+++ b/www/formats.html
@@ -1286,7 +1286,7 @@ extensions: .gz for Zip compression, .Z for Unix compression, and .bz2
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>
diff --git a/www/formats.rst b/www/formats.rst
index b85632d..66ed7cf 100644
--- a/www/formats.rst
+++ b/www/formats.rst
@@ -812,4 +812,4 @@ automatically uncompressed while the image is read.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/gm.html b/www/gm.html
index 78068fc..939709c 100644
--- a/www/gm.html
+++ b/www/gm.html
@@ -1501,6 +1501,17 @@ to an different interpretation of the standard, or getting the wires
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=&lt;value&gt;</dt>
<dd>Specify the compression factor to use while writing JPEG-2000
files. The compression factor is the reciprocal of the compression
@@ -18089,7 +18100,7 @@ color="#00B04F"><font size="+1">
<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:
diff --git a/www/index.html b/www/index.html
index 8e55a54..2cf3e53 100644
--- a/www/index.html
+++ b/www/index.html
@@ -3,7 +3,7 @@
<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" />
@@ -47,7 +47,7 @@
</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>
@@ -143,7 +143,7 @@ image</li>
</ul>
</blockquote>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
diff --git a/www/index.rst b/www/index.rst
index 51e67ea..940b2ad 100644
--- a/www/index.rst
+++ b/www/index.rst
@@ -28,7 +28,7 @@ GraphicsMagick Image Processing System
.. _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`__
=========================== ========================================================
@@ -178,4 +178,4 @@ Here are just a few examples of what GraphicsMagick can do:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/links.html b/www/links.html
index cdf3754..d5a0a25 100644
--- a/www/links.html
+++ b/www/links.html
@@ -3,7 +3,7 @@
<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>
@@ -205,7 +205,7 @@ utilities, and applications.</p>
<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>
diff --git a/www/links.rst b/www/links.rst
index 51ab568..e9f6aec 100644
--- a/www/links.rst
+++ b/www/links.rst
@@ -241,4 +241,4 @@ Stock Photos
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/miff.html b/www/miff.html
index 9caf05b..33d3674 100644
--- a/www/miff.html
+++ b/www/miff.html
@@ -458,7 +458,7 @@ individual image (composed of a header and image data) into one file.</p>
<p>John Cristy, <a class="reference external" href="mailto:magick-users&#37;&#52;&#48;imagemagick&#46;org">magick-users<span>&#64;</span>imagemagick<span>&#46;</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>
diff --git a/www/miff.rst b/www/miff.rst
index 775df78..88ba973 100644
--- a/www/miff.rst
+++ b/www/miff.rst
@@ -406,4 +406,4 @@ Maintained since 2002 by Bob Friesenhahn, GraphicsMagick Group.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/mission.html b/www/mission.html
index 8ca4869..da2ce1e 100644
--- a/www/mission.html
+++ b/www/mission.html
@@ -63,7 +63,7 @@ GraphicsMagick a stable component in Linux and BSD distributions.</li>
<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>
diff --git a/www/mission.rst b/www/mission.rst
index 9ce70f7..c22ac4b 100644
--- a/www/mission.rst
+++ b/www/mission.rst
@@ -44,4 +44,4 @@ The objectives of the GraphicsMagick project are to:
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/motion-picture.html b/www/motion-picture.html
index 9945799..30fb69e 100644
--- a/www/motion-picture.html
+++ b/www/motion-picture.html
@@ -783,7 +783,7 @@ gm identify -format '%[dpx:*]' foo.dpx
</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>
diff --git a/www/motion-picture.rst b/www/motion-picture.rst
index 5e892da..8ea5344 100644
--- a/www/motion-picture.rst
+++ b/www/motion-picture.rst
@@ -640,4 +640,4 @@ to list all DPX header attributes.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/perl.html b/www/perl.html
index 4ef1c28..6a92a5c 100644
--- a/www/perl.html
+++ b/www/perl.html
@@ -2036,7 +2036,7 @@ $status =~ /(\d+)/;
die &quot;unable to continue&quot; if ($1 == ResourceLimitError);
</pre>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
diff --git a/www/perl.rst b/www/perl.rst
index 6c4d454..f2c3666 100644
--- a/www/perl.rst
+++ b/www/perl.rst
@@ -1499,4 +1499,4 @@ The following illustrates how you can use a numeric status code::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/process.html b/www/process.html
index 4395674..7c6841a 100644
--- a/www/process.html
+++ b/www/process.html
@@ -120,7 +120,7 @@ final release.</p>
<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>
diff --git a/www/process.rst b/www/process.rst
index 3f5c829..8f46ced 100644
--- a/www/process.rst
+++ b/www/process.rst
@@ -99,4 +99,4 @@ Release Phase
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/programming.html b/www/programming.html
index 2a0dfab..bf4d9fb 100644
--- a/www/programming.html
+++ b/www/programming.html
@@ -104,7 +104,7 @@ a COM+ object.</td>
<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>
diff --git a/www/programming.rst b/www/programming.rst
index 2fac415..741b631 100644
--- a/www/programming.rst
+++ b/www/programming.rst
@@ -70,4 +70,4 @@ GraphicsMagick Group while others are developed and supported by third parties.*
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/project.html b/www/project.html
index 2fb60b7..afb0477 100644
--- a/www/project.html
+++ b/www/project.html
@@ -55,7 +55,7 @@
<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>
diff --git a/www/project.rst b/www/project.rst
index f0cd985..f6c9e02 100644
--- a/www/project.rst
+++ b/www/project.rst
@@ -59,4 +59,4 @@ GraphicsMagick Project Information
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2012 - 2019
+Copyright |copy| GraphicsMagick Group 2012 - 2020
diff --git a/www/quantize.html b/www/quantize.html
index 2ff18af..7979c61 100644
--- a/www/quantize.html
+++ b/www/quantize.html
@@ -244,7 +244,7 @@ values in the image.</dd>
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>
diff --git a/www/quantize.rst b/www/quantize.rst
index 3f1fd82..855d750 100644
--- a/www/quantize.rst
+++ b/www/quantize.rst
@@ -240,4 +240,4 @@ permission, this document is an adaptation from a document he wrote.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/reference.html b/www/reference.html
index 94c40a3..eaded6e 100644
--- a/www/reference.html
+++ b/www/reference.html
@@ -44,7 +44,7 @@
<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>
diff --git a/www/reference.rst b/www/reference.rst
index c83c4c3..950570b 100644
--- a/www/reference.rst
+++ b/www/reference.rst
@@ -26,4 +26,4 @@ Links_ - Some links we find useful.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2012 - 2019
+Copyright |copy| GraphicsMagick Group 2012 - 2020
diff --git a/www/security.html b/www/security.html
index a7fb5af..397b67d 100644
--- a/www/security.html
+++ b/www/security.html
@@ -3,7 +3,7 @@
<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>
@@ -322,7 +322,7 @@ akWaTz0WKIOiD9Lm2ylI9J0=
=UAq2
-----END PGP PUBLIC KEY BLOCK-----
</pre>
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</div>
</body>
diff --git a/www/security.rst b/www/security.rst
index 02cbbaf..d187c8a 100644
--- a/www/security.rst
+++ b/www/security.rst
@@ -316,4 +316,4 @@ correspondence::
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/thanks.html b/www/thanks.html
index 6eaa6aa..f00f201 100644
--- a/www/thanks.html
+++ b/www/thanks.html
@@ -136,7 +136,7 @@ reduction.</dd>
</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
diff --git a/www/thanks.rst b/www/thanks.rst
index 691950c..0975ac9 100644
--- a/www/thanks.rst
+++ b/www/thanks.rst
@@ -121,7 +121,7 @@ Thomas R Crimmins
.. |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
diff --git a/www/tools.html b/www/tools.html
index a9f2161..8d80374 100644
--- a/www/tools.html
+++ b/www/tools.html
@@ -177,7 +177,7 @@ a rotated version of them in TIFF format:</p>
<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>
diff --git a/www/tools.rst b/www/tools.rst
index 02561ee..5edb2d2 100644
--- a/www/tools.rst
+++ b/www/tools.rst
@@ -170,5 +170,5 @@ properties optionally appearing just below the individual tile.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/utilities.html b/www/utilities.html
index 0428359..7779217 100644
--- a/www/utilities.html
+++ b/www/utilities.html
@@ -97,7 +97,7 @@ commands are as follows:</p>
</tbody>
</table>
<hr class="docutils" />
-<p>Copyright © GraphicsMagick Group 2002 - 2019</p>
+<p>Copyright © GraphicsMagick Group 2002 - 2020</p>
</div>
</body>
</html>
diff --git a/www/utilities.rst b/www/utilities.rst
index 7f7ff05..f1b212f 100644
--- a/www/utilities.rst
+++ b/www/utilities.rst
@@ -66,4 +66,4 @@ version_ Report GraphicsMagick version, features, and build options.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2002 - 2019
+Copyright |copy| GraphicsMagick Group 2002 - 2020
diff --git a/www/version.html b/www/version.html
index 3a80d5e..96ea0b0 100644
--- a/www/version.html
+++ b/www/version.html
@@ -109,7 +109,7 @@ color="#00B04F"><font size="+1">
<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:
diff --git a/www/wand/wand.html b/www/wand/wand.html
index f812de5..1526a84 100644
--- a/www/wand/wand.html
+++ b/www/wand/wand.html
@@ -134,7 +134,7 @@ gcc -o demo demo.c -O `GraphicsMagickWand-config --cppflags --ldflags --libs`
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>
diff --git a/www/wand/wand.rst b/www/wand/wand.rst
index 9ab98ce..906a8c5 100644
--- a/www/wand/wand.rst
+++ b/www/wand/wand.rst
@@ -111,4 +111,4 @@ your program will compile and run.
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
-Copyright |copy| GraphicsMagick Group 2009 - 2019
+Copyright |copy| GraphicsMagick Group 2009 - 2020