Commit Graph
140 Commits
Author SHA1 Message Date
Andrew Champion af010edcfd Support 32-bit encoding 2019-12-10 20:18:53 +00:00
Andrew Champion f32b3b9d10 Fix warnings in encoding test 2019-12-10 20:18:53 +00:00
Andrew Champion 1f92c562bc Support 32-bit rgb and rgba decoding 2019-12-10 20:18:51 +00:00
Andrew Champion fca4e1f88a Support 32-bit grayscale decoding 2019-12-10 20:18:23 +00:00
HeroicKatora ff574b4ca2 Merge pull request #64 from image-rs/release-0.4
Document changes for release 0.4
v0.4,0
2019-11-23 19:43:33 +01:00
HeroicKatora 6f87228458 Merge pull request #65 from image-rs/error-type
Improve the error types
2019-11-21 19:36:38 +01:00
Andreas Molzer 15929f8b8e Document changes for release 0.4
Fixes: #60
2019-11-21 19:23:03 +01:00
Andreas Molzer f13492e41d Fix a doc typo found in PR review 2019-11-21 18:46:55 +01:00
Andreas Molzer 1d9944c5c5 Mark both detailed error types as non-exhaustive
This makes it cheaper to introduce new features that might require
amending the list of variants by allowing us to introduce previously
uncovered causes or more specialized representations.
2019-11-20 20:58:45 +01:00
Andreas Molzer a14b23473b Export the inflate error publicly
It encapsulates the implementation detail of holding a miniz_oxide
status within. The derived traits are not too extensive for other
possible representations as well.
2019-11-20 20:02:55 +01:00
Andreas Molzer 101940335c Fix public constructor from miniz_oxide status
Avoids leaking the dependency on `miniz_oxide` into the public interface
by making a constructor taking a status argument crate internal. It
would otherwise not be possible to replace the deflate decoder without
breaking that interface.
2019-11-20 19:56:13 +01: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
Andreas Molzer 7b672998db Get rid of num-traits crate
Turns out the only use was as a private bound which was unused within
that method.
2019-11-12 20:06:02 +01:00
HeroicKatora 62fee106a7 Merge pull request #62 from onnotechno/multipage_image_patch
Multipage image patch
2019-11-12 13:13:57 +01:00
Onno Kammeraad fd789dc420 Cursor::new(Vec::new()) requires a &mut instead of just & 2019-11-12 13:09:09 +01:00
Andreas Molzer 07e8501ad6 Prefer matching over if-else-chain in tags macro
Thanks to the review comment for pointing this style issue out.
2019-11-12 10:53:38 +01:00
OnnoandHeroicKatora f70447325e Update tests/encode_images.rs
Co-Authored-By: HeroicKatora <HeroicKatora@users.noreply.github.com>
2019-11-12 10:40:19 +01:00
Onno Kammeraad b2eb480c44 add multipage testcase, to validate the multipage image handling 2019-11-12 09:44:27 +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
Andreas Molzer a6696ab02f fixup! Move everything to the tags macro 2019-11-10 19:24:22 +01:00
Andreas Molzer 258edf4a46 Remove the num-derive dependency 2019-11-10 18:02:43 +01:00
Andreas Molzer f88c9f00c3 Move everything to the tags macro 2019-11-10 18:02:42 +01:00
Andreas Molzer f80f4a06d5 Make the Unknown field optional
Several other uses that currently rely on num-traits for conversion have
no Unknown representation. Thus, the converter now outputs only known
variants or an error and the exposing function then can put the error
value into an Unknown variant instead.
2019-11-10 18:02:08 +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
Andreas Molzer ffdeb62b9f Rework the tag macro to make it reusable
Factor out parts that are unique to instantiations such as the name, the
documentation, the underlying type, the public conversion methods.

Also adds the ability to document individual items and remodels the
syntax to more closely resemble ordinary enum definitions.
2019-11-01 01:35:18 +01:00
HeroicKatora 6aea7b33c1 Merge pull request #49 from Masterchef365/deflate
Old-style DEFLATE compression support
2019-11-01 00:42:18 +01:00
HeroicKatora 770262cb02 Merge pull request #25 from birktj/new_tests
Test decoder output
2019-10-15 04:35:06 +02:00
HeroicKatora 1f957029af Merge pull request #55 from trolleyman/master
Make Limits struct fields publicly accessible
2019-10-14 21:07:11 +02:00
Masterchef365 f8d4b57120 Change implementation details for InflateError, add uncompressed cap 2019-10-04 18:52:39 -07:00
Masterchef365 6f9f2adfbf Improved error messages for inflate decompression 2019-10-02 21:06:11 -07:00
Masterchef365 205626bd62 Switch to miniz_oxide crate for DEFLATE decompression 2019-10-02 18:51:47 -07:00
Masterchef365 ce73d39d57 Add old-style DEFLATE support 2019-10-02 18:51:07 -07:00
Masterchef365 b79128d766 Add Deflate and OldDeflate compression type recognition 2019-10-02 18:51:07 -07:00
HeroicKatora c8f384d6a6 Merge pull request #58 from paolobarbolini/update-num-derive
update num-derive to 0.3, bump rustc to 1.34.2
2019-10-01 21:01:21 +02:00
Paolo Barbolini ce1d4cb289 update num-derive to 0.3 change minimal rustc to 1.34.2 2019-10-01 20:31:43 +02:00
HeroicKatora b95e5b8f95 Merge pull request #56 from trolleyman/invalid_test_names
Renamed test files
2019-09-22 23:43:51 +02:00
Callum Tolley bc05e0b7c6 Renamed files 2019-09-22 22:25:29 +01:00
Callum Tolley 3868f78067 Make Limits struct fields publicly accessible 2019-09-22 22:11:24 +01:00
HeroicKatora f6a91065d9 Merge pull request #53 from JohnTitor/remove-try-macros
Remove `try!` macros
2019-08-29 21:40:27 +02:00
Yuki Okushi ea19f0f686 Remove try! macros 2019-08-29 19:10:27 +09:00
HeroicKatora 3b85b68ae9 Merge pull request #51 from 51systems/tiff6-signed
Signed value support
2019-08-16 16:52:27 +02: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
HeroicKatora 1c2e57a22a Merge pull request #45 from image-rs/release-0.3.1
Bump version to 0.3.1
v0.3.1
2019-05-26 03:23:55 +02:00
Andreas Molzer 2c7f329115 Bump version to 0.3.1
There are no function changes from 0.3 but the compiler requirements
have been lowered. This avoids having to make a decision on `image`
right now, which would delay valuable bug fixes and improvements.
2019-05-26 02:01:12 +02:00
HeroicKatora c9675360cf Merge pull request #44 from birktj/rustc-version
Change minimal rustc version to 1.24.1
2019-05-26 01:35:47 +02:00
Birk Tjelmeland 514b7cddaa Change minimal rustc version to 1.24.1 2019-05-03 23:12:29 +02:00
HeroicKatora fa900be945 Merge pull request #43 from birktj/update_version
Release version 0.3
v0.3.0
2019-04-25 23:10:56 +02:00
Birk Tjelmeland d8d689d859 Exclude test images from cargo package 2019-04-25 23:05:41 +02:00