[prev in list] [next in list] [prev in thread] [next in thread]
List: graphicsmagick-commit
Subject: [GM-commit] GraphicsMagick: TIFF: Allow scanline/strip/tile to be up to 1000...
From: GraphicsMagick Commits <graphicsmagick-commit () lists ! sourceforge ! net>
Date: 2017-09-17 21:41:54
Message-ID: mailman.31467.1505684529.14626.graphicsmagick-commit () lists ! sourceforge ! net
[Download RAW message or body]
changeset 787faf42625c in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=787faf42625c
summary: TIFF: Allow scanline/strip/tile to be up to 1000X times the size of the \
input file to allow super-compressed files.
diffstat:
ChangeLog | 7 +++++
VisualMagick/installer/inc/version.isx | 4 +-
coders/tiff.c | 46 +++++++++++++++++++++++++--------
magick/version.h | 4 +-
www/Changelog.html | 9 ++++++
5 files changed, 54 insertions(+), 16 deletions(-)
diffs (126 lines):
diff -r 36f5114a5d34 -r 787faf42625c ChangeLog
--- a/ChangeLog Sat Sep 16 16:39:59 2017 -0500
+++ b/ChangeLog Sun Sep 17 16:41:51 2017 -0500
@@ -1,3 +1,10 @@
+2017-09-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * coders/tiff.c (ReadTIFFImage): Allow a single scanline, strip,
+ tile, to be 1000X larger than the input file in order to not cause
+ problems for extremely compressible images or tile sizes much
+ larger than the pixel dimensions.
+
2017-09-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/symbols.h, wand/wand_symbols.h: Update C library symbols
diff -r 36f5114a5d34 -r 787faf42625c VisualMagick/installer/inc/version.isx
--- a/VisualMagick/installer/inc/version.isx Sat Sep 16 16:39:59 2017 -0500
+++ b/VisualMagick/installer/inc/version.isx Sun Sep 17 16:41:51 2017 -0500
@@ -10,5 +10,5 @@
#define public MagickPackageName "GraphicsMagick"
#define public MagickPackageVersion "1.4"
-#define public MagickPackageVersionAddendum ".020170916"
-#define public MagickPackageReleaseDate "snapshot-20170916"
+#define public MagickPackageVersionAddendum ".020170917"
+#define public MagickPackageReleaseDate "snapshot-20170917"
diff -r 36f5114a5d34 -r 787faf42625c coders/tiff.c
--- a/coders/tiff.c Sat Sep 16 16:39:59 2017 -0500
+++ b/coders/tiff.c Sun Sep 17 16:41:51 2017 -0500
@@ -1650,7 +1650,7 @@
magick_off_t
file_size,
- max_compress_ratio=70; /* Maximum compression ratio */
+ max_compress_ratio=1000; /* Maximum compression ratio */
uint16
compress_tag,
@@ -1925,22 +1925,44 @@
#endif
}
/*
- Allocate memory for the image and pixel buffer.
+ Map from TIFF compression tags to GraphicsMagick equivalents
+ as well as estimate a maximum compression ratio (for
+ validating scanline/strip/tile allocation requests).
*/
switch (compress_tag)
{
- case COMPRESSION_NONE: image->compression=NoCompression; break;
- case COMPRESSION_CCITTFAX3: image->compression=FaxCompression; break;
- case COMPRESSION_CCITTFAX4: image->compression=Group4Compression; break;
- case COMPRESSION_JPEG: image->compression=JPEGCompression; break;
- case COMPRESSION_OJPEG: image->compression=JPEGCompression; break;
- case COMPRESSION_LZW: image->compression=LZWCompression; break;
+ case COMPRESSION_NONE:
+ image->compression=NoCompression;
+ break;
+ case COMPRESSION_CCITTFAX3:
+ image->compression=FaxCompression;
+ break;
+ case COMPRESSION_CCITTFAX4:
+ image->compression=Group4Compression;
+ break;
+ case COMPRESSION_JPEG:
+ image->compression=JPEGCompression;
+ break;
+ case COMPRESSION_OJPEG:
+ image->compression=JPEGCompression;
+ break;
+ case COMPRESSION_LZW:
+ image->compression=LZWCompression;
+ break;
#if defined(COMPRESSION_LZMA)
- case COMPRESSION_LZMA: image->compression=LZMACompression; break;
+ case COMPRESSION_LZMA:
+ image->compression=LZMACompression;
+ break;
#endif /* defined(COMPRESSION_LZMA) */
- case COMPRESSION_DEFLATE: image->compression=ZipCompression; break;
- case COMPRESSION_ADOBE_DEFLATE: image->compression=ZipCompression; break;
- default: image->compression=RLECompression; break;
+ case COMPRESSION_DEFLATE:
+ image->compression=ZipCompression;
+ break;
+ case COMPRESSION_ADOBE_DEFLATE:
+ image->compression=ZipCompression;
+ break;
+ default:
+ image->compression=NoCompression;
+ break;
}
image->columns=width;
image->rows=height;
diff -r 36f5114a5d34 -r 787faf42625c magick/version.h
--- a/magick/version.h Sat Sep 16 16:39:59 2017 -0500
+++ b/magick/version.h Sun Sep 17 16:41:51 2017 -0500
@@ -38,8 +38,8 @@
#define MagickLibVersion 0x191600
#define MagickLibVersionText "1.4"
#define MagickLibVersionNumber 19,16,0
-#define MagickChangeDate "20170916"
-#define MagickReleaseDate "snapshot-20170916"
+#define MagickChangeDate "20170917"
+#define MagickReleaseDate "snapshot-20170917"
/*
The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines
diff -r 36f5114a5d34 -r 787faf42625c www/Changelog.html
--- a/www/Changelog.html Sat Sep 16 16:39:59 2017 -0500
+++ b/www/Changelog.html Sun Sep 17 16:41:51 2017 -0500
@@ -35,6 +35,15 @@
<div class="document">
+<p>2017-09-17 Bob Friesenhahn <<a class="reference external" \
href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span> \
4;</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p>
+<blockquote>
+<ul class="simple">
+<li>coders/tiff.c (ReadTIFFImage): Allow a single scanline, strip,
+tile, to be 1000X larger than the input file in order to not cause
+problems for extremely compressible images or tile sizes much
+larger than the pixel dimensions.</li>
+</ul>
+</blockquote>
<p>2017-09-16 Bob Friesenhahn <<a class="reference external" \
href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span> \
4;</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p>
<blockquote>
<ul class="simple">
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Graphicsmagick-commit mailing list
Graphicsmagick-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic