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
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
ruffson
e2caf86f6a
Add intos for Short
2020-11-16 19:01:18 +01:00
ruffson
9f4799912f
Remove geokey parsing
2020-11-16 18:57:48 +01:00
ruffson
4b218be4ac
Add geodir hashmap to decoder
2020-11-16 18:57:24 +01:00
ruffson
96d6d52830
Move geo code in its own dir
2020-11-16 18:57:24 +01:00
ruffson
62a1a500a5
Add support for GeoTiff geokey dir
2020-11-16 18:57:21 +01:00
ruffson
3953bd31e1
Read out short vecs and ascii from ifds
2020-11-16 18:52:04 +01:00
HeroicKatora
83004c8344
Merge pull request #104 from image-rs/edition2018
...
Convert to edition 2018
2020-10-31 20:31:03 +01:00
Andreas Molzer
8ab9d30eff
Convert to edition 2018
...
Notably, This enables NLL even on older compilers such as 1.34.
2020-10-31 20:13:30 +01:00
Andreas Molzer
ed22865f04
Remove unused and incorrect Wrapping impl
...
This is used in the predictor and should be reversible but for floating
point the simply addition is not. It should instead be some variant of
byte casting but it hasn't been implemented yet.
2020-10-11 15:09:46 +02:00
ruffson
6281360f10
Fix error case
2020-09-26 18:45:58 +02:00
ruffson
d00ab0cc61
Fix formatting
2020-09-26 17:22:59 +02:00
ruffson
7c4ee96aee
Check for size when reading strip bytes
2020-09-26 16:50:51 +02:00
ruffson
cb5319c426
Deal with empty jpeg_tables
2020-09-26 14:35:06 +02:00
ruffson
cb900819d9
Remove tile processing and add error handling
...
I removed the code that checked the tile attributes. Because I would
rather later on PR something that works than a half-baked solution.
2020-09-26 14:07:27 +02:00
ruffson
35ea719d9e
Remove get_all_tags()
2020-09-26 13:44:53 +02:00
ruffson
5fd0534ea2
Fix error handling
2020-09-26 12:23:40 +02:00
ruffson
72474b569e
Add byte expected error and cleanup
2020-09-25 20:06:52 +02:00
ruffson
46918b395c
Condense tile and strip reading code
2020-09-25 19:47:35 +02:00
ruffson
a510b03e1c
Apply auto-format to modified files
2020-09-25 19:47:33 +02:00
ruffson
2cb57a4d04
Add initial support for modern JPEG compression
...
Some things still need to be done:
- Check RGB images
- Check small images
- Check huffman-only jpeg tables
- Check empty jpeg tables
- Add tests
2020-09-25 19:42:29 +02:00
ruffson
da9bdac8a2
Read out byte-sized arrays
2020-09-25 19:39:09 +02:00
Andreas Molzer
7b41c823e9
Some slight manual touch up where style was bad
2020-09-12 01:15:45 +02:00
Andreas Molzer
bf24b3f935
Do a clippy pass
2020-09-12 01:15:08 +02:00
Andreas Molzer
44c75a66ab
Merge remote-tracking branch 'origin/master' into features/32-bit-float-samples
2020-08-31 20:50:16 +02:00
Andreas Molzer
d8bfa84d06
Add notes for unsupported predictors
2020-08-31 19:53:06 +02:00