Jonathan Behrens
b318481c55
Merge pull request #143 from Christopher22/reset_tag_values
...
Do not carry tag values from previous images
2021-08-15 11:43:44 -04:00
5225225
1774b362d3
x
2021-07-15 18:08:40 +01:00
Tomáš Král
e92cf219a9
Fix the mandrill.tiff regression ( #145 )
...
* fix mandrill.tiff regression from upstream
* use contains_key(), added StripTileTagConflict error
* updated test_div_zero, added test_no_rows_per_strip
2021-06-17 09:22:07 -04:00
Christopher Gundler
3e5f977460
Do not carry tag values from previous images
2021-06-14 20:21:51 +02:00
5225225
f0666aebbf
Fix overflow when calculating strip height for multiple images
2021-05-29 22:52:42 +01:00
5225225
65a1fbe8ae
Test for short JPEG tag
2021-05-29 22:12:35 +01:00
5225225
03b6ed413b
Fix out of bounds subtraction with invalid JPEG table
2021-05-29 22:12:35 +01:00
5225225
5b7814c994
Check for OOM when creating LZWReader
2021-05-29 22:12:35 +01:00
5225225
a15d619471
Fix OOM in Jpeg decoding buffer allocation
2021-05-29 22:12:35 +01:00
HeroicKatora
153ed48ee7
Merge pull request #136 from TomasKralCZ/padding_skip
...
remove padding_buffer
2021-05-29 15:13:20 +02:00
5225225
2bb37a4ecd
Do checked multiplication for samples per strip
2021-05-29 12:37:15 +01:00
5225225
b41ac105ab
Use checked multiplication when calculating buffer size
2021-05-29 12:36:59 +01:00
5225225
1e10b9803b
Add check for an invalid strip count
2021-05-29 12:36:50 +01:00
5225225
2f4e491874
Check for where tag count * tag size overflows
2021-05-28 20:32:30 +01:00
5225225
eda5a8ac30
Fix division by zero issue with malformed file
2021-05-28 14:44:50 +01:00
Tomáš Král
ad0f75222a
remove padding_buffer
2021-05-21 18:06:05 +02:00
Tomáš Král
4dc7c2a986
add comment in expand_strip()
2021-05-18 18:31:17 +02:00
Tomáš Král
b7c4f668ae
remove redundant subrange and outdated comments
2021-05-16 12:00:15 +02:00
Tomáš Král
371a9b53c3
fix u64::MAX error on older compilers
2021-05-15 21:31:11 +02:00
Tomáš Král
d0e4f37a28
implement subrange for DecodingBuffer
2021-05-15 21:14:00 +02:00
Tomáš Král
46c7efd836
remove unneeded mutability
2021-05-15 19:55:48 +02:00
Tomáš Král
65832e01bd
Merge branch 'master' into inversion
2021-05-15 19:49:01 +02:00
Tomáš Král
521b58dc07
expand_strip and expand_tile cleanup
2021-05-15 18:12:34 +02:00
Ingvar Stepanyan
a6fb855121
Improve deflate support
...
- Switch to streaming decompression via `flate2`. Aside from performance improvements and lower RAM consumption, this fixes a bug where `max_uncompressed_length` was precalculated for a single tile but then used as a hard limit on the whole data, failing to decompress any tiled images.
- Deprecate `InflateError` - this was used for wrapping `miniz_oxide` raw status, but `flate2` already reports them as `io::Error` instead. This makes errors from both Lzw and Deflate modes more consistent - they're all now just `io::Error`.
- Add support for new `Deflate` tag in addition to `OldDeflate` - format-wise it's same Zlib, and on practice decodes successfully with the same underlying code.
- Slightly simplify partial reads from the `Reader` by using the `std::io::copy` helper instead of doing it manually.
Fixes #131 .
2021-05-08 15:34:14 +01:00
Tomáš Král
d4ce174236
Merge remote-tracking branch 'upstream/master' into tiles
2021-04-14 13:32:56 +02:00
HeroicKatora
a43aa1fbc7
Merge pull request #126 from fintelia/better-decompress
...
Simplify de-compression logic
2021-04-12 18:36:07 +02:00
Tomáš Král
00e0eb9006
incremental tile decoding, refactoring
2021-04-12 15:09:39 +02:00
Jonathan Behrens
1eb9c4fab7
fix borrow check issue on rustc 1.34.2
2021-04-10 21:45:04 -04:00
Jonathan Behrens
201b95f749
Improve expand_strip and remove read_{u16, u32, ...}_into
2021-04-10 21:34:57 -04:00
Jonathan Behrens
7641dcbd3f
Refactoring to simplify expand_strip function
2021-04-10 15:02:16 -04:00
Jonathan Behrens
60c6e0cd90
Simplify de-compression logic
2021-04-10 14:49:04 -04:00
Tomáš Král
65a1c553af
TileAttributes doc comments, padding buffer limit check
2021-04-06 20:42:48 +02:00
Tomáš Král
68f2182918
fixed WhiteIsZero processing
2021-04-04 19:34:14 +02:00
Tomáš Král
b2a7e35c85
added basic tiled-based decoding
2021-04-04 18:15:28 +02:00
HeroicKatora
8fcacc829f
Merge pull request #119 from kalcutter/missing-tags-and-i64
...
Implement missing tag types and signed 64-bit support
2021-03-24 12:25:01 +01:00
Emmanuel Antony
f5754159cb
Modified the validation for ascii tag type
2021-03-20 08:47:47 +05:30
Kal Conley
d086e289dd
Implement missing tag types and signed 64-bit support
2021-03-17 01:24:32 +01:00
Vadim Dyadkin
3de87a7001
Open tif files containing i32 arrays
2021-02-20 18:25:29 +01:00
HagaiHargil
8a8e3ed753
Rustfmt
2020-12-13 12:03:53 +02:00
HagaiHargil
cd2f4f6462
Added tests and finalized i8 support
2020-12-13 12:00:48 +02:00
HagaiHargil
aa13e31894
Initial i8 support
2020-12-13 11:37:56 +02:00
Andreas Molzer
332ab1dc4d
Use WhiteIsZero interpretation of libtiff
...
Note that the variants are even named `MINISWHITE` in their code.
Address the remaining review nits.
2020-12-11 20:36:33 +01:00
HagaiHargil
ec98e32a3b
Removed unused wrapping f32 and f64
2020-12-08 13:46:09 +02:00
HagaiHargil
9788085786
Int16 support
2020-12-08 13:33:25 +02:00
HeroicKatora
6cdd340933
Merge pull request #112 from image-rs/unlimited
...
Add a constant unlimited limit
2020-12-06 21:24:54 +01:00
HeroicKatora
ef004cee48
Merge pull request #108 from image-rs/short-read-in-lzw
...
Fix lzw decoding stopping short of full decode
2020-12-06 02:52:06 +01:00
Andreas Molzer
6d7d92c605
Adjust field names based on review
2020-12-06 02:34:59 +01:00
Andreas Molzer
0c06d32ee4
Add a constant unlimited limit
2020-12-05 18:20:23 +01:00
Andreas Molzer
4d8c64bf1e
Fix lzw decoding stopping short of full decode
...
When the required amount of data was just a tiny bit larger than full a
page size (one buffer increment), the decoder would stop since all
compressed data had been read. However, the lzw decoder contains a small
internal bit buffer for code decoding. That is, some remaining bytes had
been retained and were still left to be decoded.
2020-12-05 14:57:28 +01:00
Jonathan Behrens
67105fe4ec
Refactor Entry::val function
2020-12-04 18:59:51 -05:00