Jonathan Behrens
6ba5553d20
Compute tile attributes on demand
2022-01-12 19:50:06 -05:00
Jonathan Behrens
a36cd6bd90
chunk_{offsets,bytes} to replace {tile,strip}_{offsets,bytes}
2022-01-12 19:50:06 -05:00
Jonathan Behrens
63e6ef8bba
Add current_chunk to replace strip_index and current_tile
2022-01-12 19:50:06 -05:00
Jonathan Behrens
2d10cff97e
Reading fields shouldn't need the entire Decoder
2022-01-12 19:50:06 -05:00
Jonathan Behrens
23fe194ad9
Remove read_ifd_offset_nonrepeating
2022-01-12 19:50:06 -05:00
Jonathan Behrens
2d572c0370
Remove Decoder::byte_order
2022-01-12 19:50:06 -05:00
Jonathan Behrens
4c942ca690
Read JPEGTables ahead of time
2022-01-12 19:50:06 -05:00
Jonathan Behrens
a19d35233a
Read predictor ahead of time
2022-01-12 19:50:06 -05:00
Jonathan Behrens
31da6737b9
More refactoring
2022-01-12 19:45:41 -05:00
Jonathan Behrens
e9aa39d895
Initialize Decoder in new instead of init
2022-01-12 19:45:41 -05:00
Jonathan Behrens
3242d328d1
Reformat
2021-12-22 12:06:12 -05:00
Jonathan Behrens
d6c42dd60a
Some refactoring of strip/tile decoding
2021-12-22 12:05:38 -05:00
5225225
885d762def
Implement cycle checking in IFD offsets
2021-09-08 18:08:10 +01:00
5225225
2c9e02d347
Merge remote-tracking branch 'origin/master' into oom
2021-09-06 17:53:16 +01:00
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
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
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
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
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