KAMADA Ken'ichi
7365bc564f
Wrap TIFF parser functions into a struct.
2021-06-05 19:32:24 +09:00
KAMADA Ken'ichi
8232c6cd51
Deprecate impl From<{Rational,SRational}> for {f64,f32}.
...
The #[deprecated] attribute does not work on impl items, so
comments have been added.
2021-05-04 22:12:47 +09:00
KAMADA Ken'ichi
8a9e10de60
Add Rational::to_f32 and SRational::to_f32.
2021-05-04 21:54:44 +09:00
KAMADA Ken'ichi
17344addcb
Add a test file for little-endian data.
2021-05-04 21:42:26 +09:00
KAMADA Ken'ichi
8f7f8afc35
Remove AnnotatableTryInto and cleanup the uses of TryFrom.
2021-04-03 23:34:25 +09:00
KAMADA Ken'ichi
da36010bb9
Update documentation.
2021-03-21 17:56:37 +09:00
KAMADA Ken'ichi
a2596027c8
Simplify length-specified reads.
2021-02-23 22:20:01 +09:00
KAMADA Ken'ichi
180ac576b7
Add more examples in the crate-level documentation.
2021-02-04 22:38:42 +09:00
KAMADA Ken'ichi
4da1e340fc
Move the upgrade guide into a separate module.
2021-01-24 19:40:04 +09:00
KAMADA Ken'ichi
6c08800089
Cleanup buffer length calculation.
2021-01-24 19:38:31 +09:00
KAMADA Ken'ichi
37001e4cba
Change an error that should never happen to Option::expect.
2021-01-07 22:49:33 +09:00
KAMADA Ken'ichi
a5d8a3e618
Remove an unnecessary return.
2021-01-07 22:24:24 +09:00
KAMADA Ken'ichi
1b05eab57e
Merge the fix for an infinite loop in reading PNG files.
2021-01-05 17:55:31 +09:00
KAMADA Ken'ichi
f21df24616
Fix an infinite loop in reading PNG files.
2021-01-04 11:06:15 +09:00
KAMADA Ken'ichi
f57a972e2d
Support Exif in WebP.
2020-12-14 21:12:19 +09:00
KAMADA Ken'ichi
ef78b2241b
Check the Exif block contents in truncation tests.
2020-12-08 19:35:57 +09:00
KAMADA Ken'ichi
a406139859
Remove unnecessary use of Cursor in tests.
2020-12-02 21:48:40 +09:00
KAMADA Ken'ichi
7c113302de
ErrorKind::Interrupted should be handled by discard_exact.
2020-09-06 15:23:36 +09:00
KAMADA Ken'ichi
4b18cbfe92
Move discard_exact into BufReadExt trait.
2020-08-12 23:35:00 +09:00
KAMADA Ken'ichi
6e3c37d591
Support Exif in PNG.
2020-08-03 22:57:50 +09:00
KAMADA Ken'ichi
b99c21236e
Add tags from Design rule for Camera File system: DCF 2.0.
2020-02-29 19:11:48 +09:00
KAMADA Ken'ichi
8a853122ac
Call Reader::read_raw from read_from_container.
2020-02-29 19:10:41 +09:00
KAMADA Ken'ichi
3d32b596de
Fix a typo.
2020-02-26 21:47:39 +09:00
KAMADA Ken'ichi
7de2ff0ddd
Add more tests on truncated data.
2020-02-22 19:57:17 +09:00
KAMADA Ken'ichi
35e2ccc33b
Remove duplicate codes to display comma separated values.
2020-02-22 19:56:14 +09:00
KAMADA Ken'ichi
b1dfc310e9
Update documentation and some strings.
2020-02-15 19:17:02 +09:00
KAMADA Ken'ichi
4517a1a771
Distinguish unknown values from reserved ones.
2020-02-15 19:10:54 +09:00
KAMADA Ken'ichi
663a24de79
Try a new API set internally for Value access.
2020-02-15 19:07:58 +09:00
KAMADA Ken'ichi
22395fca25
Handle "unknown" value in BrightnessValue.
2020-02-13 21:06:27 +09:00
KAMADA Ken'ichi
79cc94f615
More readable Debug::fmt for Value::{Ascii, Undefined}.
2020-02-05 23:05:48 +09:00
KAMADA Ken'ichi
04e2cf568c
Add constants for the new tags in Exif 2.32.
2020-02-05 23:05:31 +09:00
KAMADA Ken'ichi
bc0053a2e7
Use Vec::drain to avoid an extra memory allocation.
2020-02-05 23:05:10 +09:00
KAMADA Ken'ichi
af94ad50b6
Use ? instead of .unwrap() in doctests.
2020-02-01 20:28:21 +09:00
KAMADA Ken'ichi
60c8e15b11
Update the documentation for version 0.5.
2020-01-26 23:12:47 +09:00
KAMADA Ken'ichi
1d683572be
Include the container in the Error::NotFound message.
2020-01-26 19:21:18 +09:00
KAMADA Ken'ichi
eec3791e10
Remove Error::description that has been soft-deprecated.
2020-01-26 19:20:12 +09:00
KAMADA Ken'ichi
904f4b577e
Limit the size of Exif data.
2020-01-26 19:19:50 +09:00
KAMADA Ken'ichi
d6746c4004
Change the error message when no brand is recognized.
2020-01-23 23:55:30 +09:00
KAMADA Ken'ichi
bd2602240a
Fix a stale doc comment on Exif::fields.
2020-01-23 23:54:35 +09:00
KAMADA Ken'ichi
6b461fd87a
Detect HEIF using the compatible brands.
2020-01-22 21:24:29 +09:00
KAMADA Ken'ichi
a49d2562d8
Accept HEIF image sequence files.
2020-01-21 21:41:21 +09:00
KAMADA Ken'ichi
1568e3151f
Separate struct Exif from Reader.
2020-01-20 22:05:06 +09:00
KAMADA Ken'ichi
ffabb8adc2
Remove stale comments.
2020-01-20 22:04:32 +09:00
KAMADA Ken'ichi
5219996fa4
Add Reader::read_from_container.
2020-01-19 20:58:01 +09:00
KAMADA Ken'ichi
0e398cd63a
Support reading the Exif data from the HEIF container.
2020-01-19 20:48:04 +09:00
KAMADA Ken'ichi
faefc75601
Use iter() instead of into_iter() where appropriate.
2020-01-08 22:52:44 +09:00
KAMADA Ken'ichi
3e8ed54497
Update the documents for version 0.4.
2019-12-22 22:20:49 +09:00
KAMADA Ken'ichi
5d5d995907
Remove a lifetime parameter that is no longer needed.
2019-12-22 21:08:20 +09:00
KAMADA Ken'ichi
f90f5d885a
Mark enum Context and Error as non_exhaustive.
2019-12-22 20:33:56 +09:00
KAMADA Ken'ichi
8825fcca62
Revert the type of Context back from struct to enum.
2019-12-22 20:31:44 +09:00
KAMADA Ken'ichi
47ab7e4764
Restore Reader::fields to list all fields including duplicates.
2019-12-22 20:28:25 +09:00
KAMADA Ken'ichi
fa34bc9895
Derive Clone trait for Value and Field.
2019-12-15 21:11:20 +09:00
KAMADA Ken'ichi
4276ed389b
Change Reader::fields() to return an iterator instead of a slice.
2019-12-14 21:57:56 +09:00
KAMADA Ken'ichi
1bd083cbae
Do not reference the raw buffer from Value and Field.
...
Previously, they borrowed the buffer, so users had some difficulty to
manage the lifetime of the buffer and Value/Field. For example,
a user structure was unable to contain both the buffer and a Field.
2019-12-14 21:57:35 +09:00
KAMADA Ken'ichi
1533be5a2a
Mark trait objects explicitly with dyn.
2019-10-21 23:53:43 +09:00
KAMADA Ken'ichi
23c2c189da
Use std::error::Error::source; cause was deprecated in Rust 1.33.
2019-10-21 23:30:46 +09:00
KAMADA Ken'ichi
766822c791
Use ..= for inclusive range pattern.
2019-10-21 23:25:32 +09:00
KAMADA Ken'ichi
f81d2f6e6a
Change the type of Context from enum to struct.
2019-10-21 23:12:58 +09:00
KAMADA Ken'ichi
b584930a78
Fix the lifetime annotation on DisplayValue::with_unit.
2019-07-20 21:30:30 +09:00
KAMADA Ken'ichi
8a7049c9b3
Support writing the 2nd and further IFDs.
2019-06-02 23:16:18 +09:00
KAMADA Ken'ichi
8e9ff50ca8
Support reading up to 8 IFDs.
2019-05-08 23:09:03 +09:00
KAMADA Ken'ichi
b9575efd0b
Add struct In (IFD number) to indicate primary/thumbnail images.
2019-04-20 23:16:01 +09:00
KAMADA Ken'ichi
6c3ddddc96
Remove an empty line.
2019-04-13 19:45:00 +09:00
KAMADA Ken'ichi
4829149cf7
Remove #[inline] because Tag::unit is not public to other crates.
2019-04-12 23:36:38 +09:00
KAMADA Ken'ichi
e1e4800eea
Implement From<(u32, u32)> for Rational and i32 version for SRational.
2019-04-12 23:35:28 +09:00
KAMADA Ken'ichi
437b1a1750
Eliminate unnecessary use of format! macro.
...
- Use Display::to_string in tests for conciseness.
- panic! directly takes format!-like arguments.
2019-04-09 23:11:05 +09:00
KAMADA Ken'ichi
2ffa449d9d
Support displaying a value with its unit.
...
- Field::display_value and DisplayValue::with_unit were introduced.
- The string "centimeter" was changed to "cm" for consistency
with "m", "mm", and "km".
- F-number was changed to be prefixed by "f/" only when with_unit() is
called, though it is actually not a unit.
2019-04-07 21:11:14 +09:00
KAMADA Ken'ichi
eb4723a8a9
Migrate to Rust 2018.
2019-04-01 21:11:54 +09:00
KAMADA Ken'ichi
56106534cd
Remove the deprecated tag module.
2019-03-31 23:50:04 +09:00
KAMADA Ken'ichi
f9c4ff475b
Use u8::is_ascii_uppercase() stabilized in Rust 1.24.
2019-03-27 23:16:05 +09:00
KAMADA Ken'ichi
d04939182d
Use from_be_bytes in one more place.
2019-03-26 23:25:46 +09:00
KAMADA Ken'ichi
03a7694c52
The generate_write macro no longer needs type_size argument.
2019-03-26 23:05:08 +09:00
KAMADA Ken'ichi
3429587392
Wrap a line to fit with 80-column terminals.
2019-03-26 23:02:34 +09:00
kpcyrd
288a7e85c5
Remove some usage of unsafe rust
2019-03-17 23:55:10 +09:00
KAMADA Ken'ichi
8b06acb3dd
Do not treat IFD2 and beyond as an error; just ignore them.
2018-06-17 21:34:56 +09:00
KAMADA Ken'ichi
bbca6ea229
Use {f32,f64}::{from_bits,to_bits} instead of unsafe transmute.
...
These APIs were stabilized in Rust 1.20.0.
2018-04-20 22:16:21 +09:00
Kornel
9c45d1903a
Replace try!() with ?
2018-04-17 23:21:40 +09:00
KAMADA Ken'ichi
c2912228c9
Update the description for Flash field.
2018-02-19 23:35:34 +09:00
KAMADA Ken'ichi
0f6698eb55
Explicit static lifetimes are no longer needed for constants in Rust 1.17.
2018-02-19 23:25:24 +09:00
KAMADA Ken'ichi
2ecdb77efe
Remove an unnecessary ref.
2018-01-18 23:40:05 +09:00
KAMADA Ken'ichi
827491a769
Reduce the scope of a variable.
2018-01-15 23:01:10 +09:00
KAMADA Ken'ichi
d882dce9a0
Update documentation and doc-tests.
2018-01-13 23:33:45 +09:00
KAMADA Ken'ichi
201f6887fd
Remove an unused mut.
2017-10-28 00:14:41 +09:00
KAMADA Ken'ichi
63fa7373e6
Remove Tag::value(), which has been deprecated since 0.2.0.
2017-10-22 16:13:30 +09:00
KAMADA Ken'ichi
26a64361b3
Add `Tag::TagName`s and deprecate `tag::TagName`s.
2017-10-12 22:55:56 +09:00
KAMADA Ken'ichi
1ad83d8a82
Add nanosecond and time_offset fields in struct DateTime.
2017-10-01 21:17:17 +09:00
KAMADA Ken'ichi
836244fde3
Derive Debug trait for Writer.
2017-10-01 21:16:05 +09:00
KAMADA Ken'ichi
078bfcdc78
Add the 2nd member to Value::Undefined to keep the offset of the value.
2017-08-04 21:15:19 +09:00
KAMADA Ken'ichi
eba51f05c7
Check if a child IFD pointer is an unsigned integer.
2017-07-27 20:42:29 +09:00
KAMADA Ken'ichi
51bfc6b21f
Align the offset handling of unknown types with the doc comment.
2017-07-26 23:27:48 +09:00
KAMADA Ken'ichi
561e801c88
Stringify GPS directions (N/W/S/E) as unquoted.
2017-07-23 21:43:02 +09:00
KAMADA Ken'ichi
a4f891ec25
Add Error::TooBig and NotSupported.
2017-07-18 22:42:45 +09:00
KAMADA Ken'ichi
aa41b66838
Reset the compatibility notes for version 0.3.
2017-07-18 22:36:27 +09:00
KAMADA Ken'ichi
0616fed483
Test if a Writer can be written twice.
2017-07-12 21:37:13 +09:00
KAMADA Ken'ichi
ad7ccec2f0
Fix offset calculation: - has a higher precedence than <<.
2017-07-12 21:36:42 +09:00
KAMADA Ken'ichi
f0a9297579
Add Value::iter_uint().
2017-07-11 23:33:14 +09:00
KAMADA Ken'ichi
165f95fc8e
Add Reader::get_field().
...
Specify the same type for the input/output of a transmute
when it is not expected to change the type.
2017-07-11 23:30:48 +09:00
KAMADA Ken'ichi
db718fe75a
Derive Hash trait for Tag and Context.
2017-07-11 23:29:26 +09:00
KAMADA Ken'ichi
b8aefa2722
Support tiled TIFF images.
...
This is just for convenience in case the primary image is tiled.
Tiled images are not part of the Exif 2.31 standard or the TIFF 6.0
baseline specification.
2017-07-07 22:21:44 +09:00
KAMADA Ken'ichi
d348ceb54b
Fix the display strings of the LightSource field.
2017-07-07 22:20:09 +09:00