Philipp Oppermann
47dfa0aa3e
Merge branch 'master' into encode-bigtiff
2021-04-12 11:34:41 +02:00
Philipp Oppermann
59d0b7389d
Run rustfmt
2021-03-24 11:11:56 +01:00
Philipp Oppermann
0ac444b63f
Improve documentation
2021-03-24 11:10:42 +01:00
Philipp Oppermann
ce1ee6776f
Move TiffValue trait to separate module
2021-03-24 10:47:23 +01:00
Philipp Oppermann
29a020e5ec
Clarify TODO
2021-03-23 14:44:39 +01:00
Philipp Oppermann
9021985477
Provide documentation for TiffKind helper trait
2021-03-23 14:42:05 +01:00
Philipp Oppermann
dc04282290
Fix: Use the correctly parametrized directory and image encoder types
2021-03-23 14:29:45 +01:00
Philipp Oppermann
4cfed1c7b1
Make encoders generic to support BigTiff too
2021-03-23 13:49:54 +01:00
Philipp Oppermann
745ed62808
Change associated const types of TiffValue to usize/u8
...
This allows us to reuse the trait for BigTiff encoding. It also makes things safer for normal Tiff since we properly error on 32 bit overflows now.
2021-03-23 10:56:33 +01:00
Kal Conley
d086e289dd
Implement missing tag types and signed 64-bit support
2021-03-17 01:24:32 +01:00
Robert Wassens
95f0a34bcc
Update comment
2020-12-07 12:14:36 +01:00
Robert Wassens
3e042df438
Set default strip size to 1MB
2020-12-07 11:44:21 +01:00
Robert Wassens
5346a441ae
Processed review comment
2020-12-07 11:43:09 +01:00
Robert Wassens
7da8f01f75
make strip size configurable
2020-12-05 01:39:37 +01:00
Robert Wassens
1b38ff9410
strip size = image height
2020-12-04 12:45:46 +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
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
99c038c929
Move all bytecast unsafety to one module
2020-08-16 16:24:47 +02:00
наб
b853d841f3
Drop byteorder dependency
...
Ref: https://github.com/image-rs/image/issues/1000
2020-08-14 16:52:51 +02:00
Etienne Prothon
5f48444fa0
Merge branch 'master' of github.com:Farkal/image-tiff into features/32-bit-float-samples
2020-08-04 16:43:01 +02:00
Farkal
ba1daa18b2
Allow custom encoding process ( #84 )
...
Simplify encoding of tags
2020-07-27 11:29:09 +02:00
Andrew Champion
ae4ae9c36e
Fix capitalization case of sample format enum
2020-02-10 13:21:16 +00:00
Andrew Champion
8d4bdce7aa
Add support for IEEEFP 32 and 64 bit encoding
2020-02-10 13:21:16 +00:00
Andrew Champion
a41e33e42a
Fix wrong inner types for color types
2020-02-10 13:21:16 +00:00
Andrew Champion
ec0477125f
Tags: restore primitive conversions as inherent methods
2020-02-01 18:25:05 +00:00
Andrew Champion
1c8e98bca5
Squash to cast checking
2020-01-02 12:47:39 +00:00
Andrew Champion
42c94ac3d9
Add support for CMYK(16|32|64) encoding
2019-12-21 15:57:24 +00:00
Andrew Champion
eadec8f0b9
Remove most unchecked size/index casts
...
Convert most unchecked size/index `as` casts to checked casts with
`TryFrom`, included another top-level error variant.
This has several motivations:
- Making the library as robust as possible, including to platform
differences.
- Unchecked casts are susceptible to breakage during refactorings.
- Preparing for BigTIFF support, which will require the introduction of
generics and associated types for some parts of the de/encoders.
Unchecked primitive casts cannot be bound, while TryFrom can, and
overflowing conversions become more likely.
- Remaining u16 casts may be prone in failure in existing practice and
not just in theory during future changes.
2019-12-21 15:57:24 +00:00
Andrew Champion
298dc8841d
Remove unchecked casts and magic values for some tags
2019-12-21 15:57:24 +00:00
Andrew Champion
f92be13f6c
Factor tags into own module
...
Tag representations are not decoder- or encoder-specific, so should live
in their own module accessible to both for reuse. The decoder::ifd
module remains since this module is mainly dedicated to decoding the
IFD.
2019-12-21 15:57:24 +00:00
Andrew Champion
f9cace84da
Deduplicate primitive conversions for tag enum
2019-12-21 15:57:24 +00:00
Andrew Champion
959254aee9
Deduplicate encoding tests
...
Also removes dev dependency on tempfile.
2019-12-21 15:12:25 +00:00
Andrew Champion
8c4cea5d97
Support 64-bit encoding
...
Note that this adds the LONG8 data type from BigTIFF because of bounds
requiring TiffValue. However, this datatype should not actually be
written to tags.
2019-12-10 20:18:53 +00:00
Andrew Champion
af010edcfd
Support 32-bit encoding
2019-12-10 20:18:53 +00:00
HeroicKatora
8e1c67ee53
Merge pull request #63 from image-rs/tagged
...
Replace FromPrimitive with our own tag macro
2019-11-12 20:14:25 +01:00
Onno Kammeraad
686e9b2648
added a missing offset increase while adding padding
2019-11-11 16:15:01 +01:00
Andreas Molzer
517638a38f
Prefer explicit conversion over as
...
The discriminant of some enum types can be retrieved with the `as`
operator and in C style enums it is also possible to set a specific
discriminant. However, that may silently change—breaking the value
written to the file. It is better to use that technique mostly for ffi
purposes.
2019-11-10 23:20:19 +01:00
Onno Kammeraad
cbae42ea94
fixed support for multipage images, the IDF offset is added during the new and also at the end of the internal_finish. This should only be done once
2019-11-06 14:04:18 +01:00
Onno Kammeraad
80b8ec5cdb
Somehow the current offset was invalid when using multipage images. Now using the seek function to get the current offset
2019-11-06 13:58:29 +01:00
Dustin Thomson
30eb8487a6
Signed value support
...
Add support for SBYTE, SSHORT, SLONG, SRATIONAL as per the Tiff 6.0 spec
Add support for multiple BYTE
2019-08-14 21:22:56 -06:00
Birk Tjelmeland
514b7cddaa
Change minimal rustc version to 1.24.1
2019-05-03 23:12:29 +02:00
Andrew Champion
496a2f31cf
Convert panic to error for writing wrong size strip
2019-04-25 20:03:30 +02:00
Andrew Champion
334759b08d
Remove several panics in write_image
...
Closes #35 .
2019-04-25 20:03:29 +02:00
Atul Bhosale
522fbd1a69
Format code using 'cargo fmt'
2019-04-18 00:04:43 +05:30
Birk Tjelmeland
098b799a62
Fix string encoding and clean up
2019-02-26 11:09:54 +01:00
Birk Tjelmeland
addfaa5692
Fix some small problems
2019-02-20 23:08:40 +01:00
Birk Tjelmeland
b0d7ac9cbf
Add documentation and reorganize
2019-02-09 21:53:11 +01:00
Birk Tjelmeland
fa540dbad6
Add more colortypes
2019-02-09 20:53:11 +01:00