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
8ee0bc6c83
Increment the version to 0.5.1.
2020-02-15 21:36:41 +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
4621acaaab
Increment the version to 0.5.
2020-01-26 23:19:54 +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
ad07ca1699
Merge HEIF support.
2020-01-20 22:02:26 +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
3c928122eb
Increment the version to 0.4.
2019-12-22 22:28:48 +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
9e4c996cdf
Require Rust 1.40.
2019-12-22 20:33:18 +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
90bf02c02b
Merge: Rework the lifetimes and the APIs.
...
Value and Field no longer borrow the raw buffer. Reader no longer
cheats the borrow checker to manage fields in both a Vec and a HashMap,
and Reader::fields returns an iterator instead of a slice (of the Vec).
2019-12-15 21:06:18 +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
46510fef82
Merge a patch from kpcyrd to remove some unsafe blocks.
...
A part of the patch involves copying or initializing arrays, but the
performance impact should be negligible. TryFrom will eliminate copying
when stabilized.
2019-03-26 23:17:31 +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
4874c69c24
Require Rust 1.33 or later.
2019-03-17 23:34:19 +09:00
KAMADA Ken'ichi
9a9a605a82
Increment the version to 0.3.1.
2018-06-17 21:51:49 +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
KAMADA Ken'ichi
7fcd64b40b
Mention the name on crate.io to reduce confusion.
2018-04-17 23:33:39 +09:00
Andrei Oprea
9c2440b7eb
Update README to refer kamadak-exif on crates.io
2018-04-17 23:28:23 +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
2fab18947a
Increment the version to 0.3.
2017-10-22 16:19:18 +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
7046070a83
The previous commit requires Rust 1.20.
2017-10-12 22:57:51 +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
98cb8b914c
Remove ImageWidth/Length from tests/exif.jpg for conformance to Exif.
2017-08-21 21:13:36 +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
fab83f512f
Add examples/dumpexif.rs.
2017-07-23 21:41:10 +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
c5f25db4fd
Increment the version to 0.2.3.
2017-07-16 15:28:28 +09:00
KAMADA Ken'ichi
8ffc5ced3f
Add an example to read various fields.
2017-07-16 15:16:56 +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
caafd20aad
Add tests/rwrcmp.rs to test Writer.
...
It reads Exif data, writes, re-reads, and compare the results.
2017-07-11 23:36:28 +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
KAMADA Ken'ichi
9eb8944833
Add tests for Writer.
2017-07-04 20:56:19 +09:00
KAMADA Ken'ichi
e8000ac50c
Do not output the thumbnail IFD if there are no data in it.
2017-07-02 21:51:25 +09:00
KAMADA Ken'ichi
73bced6cbf
Add an experimental Writer that encodes and writes Exif data.
2017-07-01 19:17:37 +09:00