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
ca74c03520
Fix straightforward cast/borrow lints
2025-07-14 19:25:12 +02:00
A. Molzer
59d32a66a7
Add test coverage for to byte decoding
2025-07-14 18:23:30 +02:00
A. Molzer
ab4fb4e959
Test and polish encoding extra directories
2025-07-13 23:28:24 +02:00
A. Molzer
f6e2aeffe5
Encode values immediately
...
This currently avoids buffering the collection, but not buffering them
individually where we still format it into a byte vector.
The main drive here is making the DirectoryEncoder less dependent on the
values. That is, it should be concerned with the Entry representation of
values only. A few decoders expect all values to strictly follow the
image directory and the data layout of such files should be controllable
by the user. This could be achieved by encoding dummy entries which are
later corrected once the actual item is known by seeking back and
writing the directory anew.
By no longer assuming values to be available on finishing a directory we
also prepare an interface that encodes an existing directory.
2025-07-13 03:06:40 +02:00
A. Molzer
97e230584f
Test ordering directory IFD
2025-07-10 23:57:25 +02:00
A. Molzer
43d7f66c9e
Refactor cycle and IFD tracking
...
The previous strategy could not keep track of all cycles such as
reflexive ones at the very start. Additionally, it would fail to be able
to iterate after seeking since it was overly cautious and verified the
next IFD position before allowing the read of a current IFD.
The new implementation is furthermore proof against having multiple
independent chains of IFD which may occur when iterating SubIFDs for
thumbnails. (Note that we do not verify the tree-structure, only a
freedom from cycles).
2025-07-10 23:52:07 +02:00
A. Molzer
a1be18b548
Add subsubifds test file
2025-07-10 23:48:20 +02:00
Emma
29b71ff597
add CMYKA ( #208 )
2025-06-15 16:38:22 -07:00
Jonathan Behrens
83e6d64751
Create feature flags for more compression algorithms ( #270 )
2025-06-15 15:50:14 -07:00
Wei Ji
aeab243a96
Read Short as u16, SignedShort as i16 ( #235 )
2025-06-08 18:03:08 -07:00
Micah Chambers
3bfb43e83e
Add FP16 support ( #257 )
2025-02-04 19:12:01 -08:00
Stefan Schake
a19cf37587
Support ZSTD compression method for reading ( #256 )
2024-12-20 12:50:34 -08:00
Gunnar Schulze
ff52aea06e
Add support for iterating over all tags ( #255 )
2024-11-25 19:34:11 -08:00
Jonathan Behrens
96d3a02efe
Fix 1bpp image decoding and add a test image ( #252 )
2024-10-31 20:21:02 -07:00
Jean-Baptiste Skutnik
e28ad564d9
Add horizontal predictor support ( #240 )
2024-09-23 19:45:45 +01:00
Wei Ji
307cd8be97
Add SignedByte and SignedShort enum variants ( #234 )
2024-07-21 20:37:25 -07:00
Wei Ji and tromper
0c54a18e21
Add ColorType::Multiband enum variant to support samples>1 per pixel ( #224 )
...
Co-authored-by: tromper <scott@hopkinsunderground.com >
2024-03-24 15:04:52 -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
Kurt Kühnert
da07c0f4f5
added round trip test
...
fixed ci
added colortype
2023-01-05 09:34:54 +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
Pretorer
1d8cbbc6a1
add Packbits compression
2022-01-10 11:57:59 +01:00
Pretorer
9f1e3d7a89
moved compression into TiffWriter
2022-01-10 11:55:08 +01:00
Christopher Gundler
bc7be68d0f
Simplify tests
2021-12-22 10:48:52 +01:00
Christopher Gundler
99b2aa9b3a
Add TIFF compression and corresponding tests
2021-12-21 16:47:11 +01: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