Aurelia Molzer
bc71086a96
Verify WhiteIsZero invert, add Gray(1) color type
...
This was found through the fax4 decoding that is always bilevel.
No longer silently ignore an unknown color type when a photometric
interpretation requires an inversion. DICOM requires that WhiteIsZero
and BlackIsZero are only used for samples-per-pixel=1 but we do not
strictly enforce that early. Previously for the result Multiband color
we just ignored the tag which is also not right.
2025-09-01 00:25:48 +02:00
Stephen Judkins
80ce77190e
Refactor Group4 reader into stream module
2025-08-31 01:25:43 +02:00
Stephen Judkins
666f871d30
CCITT group 4 (Fax4) decoding support
2025-08-30 23:20:41 +02:00
Aurelia Molzer
36a16db659
Merge pull request #285 from image-rs/read-into-buffer
...
Read into byte buffer
2025-07-25 19:16:09 +00:00
Alden Timme
f4378eeb80
Also split test_planar_rgb_u8 test
2025-07-22 08:48:57 -07:00
Alden Timme
49015c6e93
Move into separate test
2025-07-22 08:42:39 -07:00
Alden Timme
29402875cb
Add inner() method to decoder to provide access to raw reader
2025-07-21 20:47:47 -07:00
A. Molzer
f671293bd8
Fix byte-crc test for big endian platforms
2025-07-19 18:08:02 +02:00
A. Molzer
48d52bed9b
Return buffer layout as a struct
...
Prepares extensibility for the eventual case of supporting multi-planar
image layouts that are to be written into a multi-planar buffer as
indicated by the caller in some way (possibly not via read_*_bytes but a
method taking a wrapper around the output buffer instead). Through the
struct we can later add an indicator that can be used by the caller to
decide between methods of fetching the pixel data as appropriate.
2025-07-19 17:46:37 +02:00
A. Molzer
d07da5a6cb
Resolve clippy lints in tests
2025-07-14 19:56:06 +02:00
A. Molzer
f6a762b72c
Upgrade usage of format! and Default
2025-07-14 19:56:06 +02:00
A. Molzer
59d32a66a7
Add test coverage for to byte decoding
2025-07-14 18:23:30 +02:00
Stefan Schake
a19cf37587
Support ZSTD compression method for reading ( #256 )
2024-12-20 12:50:34 -08:00
Jonathan Behrens
96d3a02efe
Fix 1bpp image decoding and add a test image ( #252 )
2024-10-31 20:21:02 -07:00
Jonathan Behrens
4a2e76858b
Allow arbitrary number of samples as long as all have the same bit depth ( #215 )
2023-10-04 09:45:03 -07:00
Pirmin Kalberer
42feeba8da
Add basic support for planar configuration
2023-01-12 23:34:31 +01:00
Jonathan Behrens
361578df00
Fix some warnings
2022-09-04 12:35:15 -07:00
Jonathan Behrens
bd23428f52
Validate that images contain the proper number of strips ( #174 )
2022-09-04 12:00:34 -07:00
Alan Race
802949f6e1
Removed ChunkInfo and added additional functions on decoder
2022-07-18 17:15:44 +02:00
Alan Race
5cadbffebf
Changed to use u32 for chunk_index
2022-07-11 08:56:35 +02:00
Alan Race
e1f4161e0b
Removed unused functions and make InvalidChunkIndex a UsageError
2022-07-08 11:08:30 +02:00
Alan Race
8c0c13f022
Added read_chunk_at and read_chunk_to_buffer functions
2022-07-07 15:25:01 +02:00
Jonathan Behrens
8e5c5b44c5
Support floating point predictor (predictor 3)
...
Based on work by @TomasKralCZ in #135
2022-06-22 20:14:25 -07:00
Jonathan Behrens
dc8311fb99
Merge read_tiled_image and read_stripped_image
2022-05-02 19:46:28 -07:00
Alan Race
9e6f9771d3
Updated create_reader to only require &mut SmartReader and not &mut Self
2022-04-28 08:54:32 +02:00
Alan Race
592405268e
Added ability to decompress tiled jpeg files
2022-04-27 14:05:41 +02:00
Jonathan Behrens
4097bf37b1
Rename test oom_2 -> fuzzer_testcase4
2022-04-15 10:04:05 -04:00
Jonathan Behrens
e4eac36c1c
Remove now unneeded limit check
2022-04-14 21:40:19 -04:00
Jonathan Behrens
ca56836a79
Add back fuzzer generated testcases
2022-01-15 15:11:54 -05:00
Jonathan Behrens
dc95ce10ac
Remove some extremely brittle tests
2022-01-12 19:49:55 -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
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
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
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
bdfe2f55fd
Check error returned from parsing invalid image
2021-05-28 15:46:55 +01:00
5225225
eda5a8ac30
Fix division by zero issue with malformed file
2021-05-28 14:44:50 +01:00
Tomáš Král
b9590e0842
remove WhiteIsZero i8 test
2021-05-15 18:15:24 +02:00
Tomáš Král
00e0eb9006
incremental tile decoding, refactoring
2021-04-12 15:09:39 +02:00
Tomáš Král
fddc048849
changed test photos to avoid coyright, added whiteiszero test
2021-04-06 13:58:33 +02:00
Tomáš Král
b2a7e35c85
added basic tiled-based decoding
2021-04-04 18:15:28 +02:00
HagaiHargil
cd2f4f6462
Added tests and finalized i8 support
2020-12-13 12:00:48 +02:00