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
KAMADA Ken'ichi
132c9e9d18
Implement the encoder for the field values.
2017-06-30 23:23:03 +09:00
KAMADA Ken'ichi
a49a8be441
Add endian::writeu16, writeu32, and writeu64.
2017-06-29 23:19:53 +09:00
KAMADA Ken'ichi
62bf989fa9
Fix a typo and a "tag value" that has been overlooked.
2017-06-25 20:33:27 +09:00
KAMADA Ken'ichi
0949abc4ac
Increment the version to 0.2.2.
2017-06-17 22:49:08 +09:00
KAMADA Ken'ichi
5a540228c3
Implement the body of Value::display_as().
2017-06-17 21:57:38 +09:00
KAMADA Ken'ichi
7c61ddf3f9
Add Value::get_uint() to handle BYTE, SHORT, and LONG transparently.
2017-06-17 21:47:27 +09:00
KAMADA Ken'ichi
8f2ece2b01
Implement std::fmt::Display trait for DateTime.
2017-06-17 21:43:59 +09:00
KAMADA Ken'ichi
065276d5a1
Add converters from Rational/SRational to f64/f32.
...
- Rational::to_f64() and SRational::to_f64().
- From<Rational> and From<SRational> traits for f64 and f32.
2017-06-14 23:28:20 +09:00
KAMADA Ken'ichi
94e62181eb
Derive Copy and Clone traits for Rational and SRational.
2017-06-14 23:23:53 +09:00
KAMADA Ken'ichi
0d9551af0f
Add a struct for displaying a value in a tag-specific way.
2017-05-11 23:19:16 +09:00
KAMADA Ken'ichi
3736693836
Treat the built-in tag information as static data.
2017-05-11 23:18:33 +09:00
KAMADA Ken'ichi
accc66f21a
Test std::fmt::Display for Tag.
2017-04-08 20:26:51 +09:00
KAMADA Ken'ichi
91ce94844c
Implement std::fmt::Display for Rational and SRational.
2017-04-08 20:21:54 +09:00
KAMADA Ken'ichi
a83a0fc8eb
Use assert_ne!() for symmetry.
2017-04-08 20:19:04 +09:00
KAMADA Ken'ichi
0c34e29ecb
Increment the version to 0.2.1.
2017-03-27 20:05:26 +09:00
KAMADA Ken'ichi
82a6b2ef7e
Fix the note on the rename of Tag.value().
2017-03-27 20:03:28 +09:00
KAMADA Ken'ichi
e4ac5ec3f2
Increment the version to 0.2.
2017-03-26 21:30:24 +09:00
KAMADA Ken'ichi
9001103c88
Add compatibility notes in the documentation.
2017-03-26 21:29:33 +09:00
KAMADA Ken'ichi
2b663f35f3
Rename Tag.value() to Tag.number().
...
The purpose of this change is to avoid confusion with field values.
The TIFF standard basically just calls it as a "tag",
but "tag number" is used a few times.
2017-03-24 23:32:12 +09:00
KAMADA Ken'ichi
f11f3c306b
Remove parse_image().
2017-03-24 23:15:24 +09:00
KAMADA Ken'ichi
24b69ed85b
Change the return value of Readaer.fields() to a slice.
2017-03-24 23:13:24 +09:00
KAMADA Ken'ichi
81b5efa7aa
Cleanup imports and require Rust 1.15.
2017-03-24 23:09:22 +09:00
KAMADA Ken'ichi
5600fb205f
Add DateTime parser.
...
This change introduces a new variant to Error and breaks the API
compatibility.
2017-03-24 22:57:38 +09:00
KAMADA Ken'ichi
7f66863d84
Add Tag.default_value().
2017-03-24 22:46:26 +09:00
KAMADA Ken'ichi
6a5355750e
Add categories in Cargo.toml.
2017-03-22 19:45:38 +09:00
KAMADA Ken'ichi
c9ccdc343a
Derive Copy and Clone traits for Tag for future APIs.
2017-03-15 23:42:14 +09:00
KAMADA Ken'ichi
61d78aa197
Test parsing an unknown field.
2017-03-14 21:53:48 +09:00
KAMADA Ken'ichi
02525d42ed
Increment the version to 0.1.3.
2017-03-12 19:36:07 +09:00
KAMADA Ken'ichi
e939ef7fd6
Do not re-export Content and Tag by hiding the real tag module.
2017-03-12 19:18:00 +09:00
KAMADA Ken'ichi
b66b47d1fd
More tests on out-of-range accesses around unsafe code.
2017-03-12 19:16:00 +09:00
KAMADA Ken'ichi
4f2e54a6b9
Parse an empty ASCII field into an empty Vec.
...
The previous behavior was chosen to ensure that value[0] is always
present, but it is inconsistent with that of other fields.
2017-03-12 19:13:21 +09:00
KAMADA Ken'ichi
bd5fa39ba9
Clarify the error messages on truncated IFDs.
2017-03-12 19:09:02 +09:00
KAMADA Ken'ichi
8d4d3d4df0
Parse a TIFF image as well as a JPEG in the main example.
2017-03-05 08:19:37 +09:00
KAMADA Ken'ichi
ae70e71db6
Update the description of the library.
2017-03-05 08:18:53 +09:00
KAMADA Ken'ichi
566eb47719
Add constants for the new tags in Exif 2.31.
2017-03-04 21:26:03 +09:00
KAMADA Ken'ichi
3a1630c452
Test the move of Reader with Box.
2017-03-02 22:38:47 +09:00
KAMADA Ken'ichi
9ca277c3e5
Increment the version to 0.1.2.
2017-02-25 22:43:47 +09:00
KAMADA Ken'ichi
a8bb533128
Move a platform test into a separate file.
2017-02-24 20:49:57 +09:00
KAMADA Ken'ichi
74cd3435b8
Update the example to use struct Reader instead of parse_image().
2017-02-24 20:48:38 +09:00
KAMADA Ken'ichi
1d5d9fdd38
Mark parse_image() deprecated.
2017-02-24 20:46:50 +09:00
KAMADA Ken'ichi
2893059568
Add struct Reader that wraps the low-level interfaces.
2017-02-22 23:00:25 +09:00
KAMADA Ken'ichi
dd2a068d3f
Increment the version to 0.1.1.
2017-01-12 22:06:26 +09:00
KAMADA Ken'ichi
b075a27d4e
Change Tiff to TIFF in a comment.
2017-01-12 22:01:47 +09:00
KAMADA Ken'ichi
00c369e092
Fix a typo.
2017-01-12 21:52:31 +09:00
KAMADA Ken'ichi
906a25cb31
Add parse_image(), which accepts a JPEG or TIFF image.
2017-01-12 21:51:11 +09:00
KAMADA Ken'ichi
e5ffcb23c4
Add the documentation and homepage fields in the manifest.
2017-01-03 08:21:00 +09:00
KAMADA Ken'ichi
52cd087113
Fill in the manifest.
2016-12-30 23:46:33 +09:00
KAMADA Ken'ichi
038078fa13
Add the Usage section in README.
2016-12-30 23:39:16 +09:00
KAMADA Ken'ichi
9dce2590c3
Change a comment on get_exif_attr() to a doc comment.
2016-12-30 23:22:13 +09:00
KAMADA Ken'ichi
2a0c4d9f61
Fix comments on Value variants.
2016-12-30 23:19:02 +09:00
KAMADA Ken'ichi
3e05fa1a09
Add README.
2016-12-20 23:27:26 +09:00
KAMADA Ken'ichi
92a3c49bb2
Add an example to parse a JPEG file.
2016-12-18 23:38:11 +09:00
KAMADA Ken'ichi
5d9190304f
Return the little-endian flag from parse_exif().
2016-12-17 00:30:46 +09:00
KAMADA Ken'ichi
de37fa8f00
Test if a constant variable can be used in the match arm.
2016-12-14 22:08:51 +09:00
KAMADA Ken'ichi
e894654d68
Reduce the object size of the big match in get_tag_info().
2016-12-14 22:02:55 +09:00
KAMADA Ken'ichi
5cb98a8f1b
Allow Exif and other IFDs in the thumbnail image.
...
The Exif specfication allows Exif/GPS/Interoperability IFDs in the
thumbnail image (1st IFD) as well as in the primary one (0th IFD).
Do not define separate sets of tag constants for primary and thumbnail
images because it doubles the number of constants. Instead, add a
flag in struct Field to distinguish them.
2016-12-12 21:27:35 +09:00
KAMADA Ken'ichi
05e5852918
Add constants for tags defined in the Exif specification.
2016-12-06 22:08:47 +09:00
KAMADA Ken'ichi
66c92e0441
Avoid repeating contexts in tag constants definition.
2016-12-06 22:05:43 +09:00
KAMADA Ken'ichi
d180bfbae8
Add Tag::description() and implement fmt::Display for Tag.
2016-11-24 22:23:05 +09:00
KAMADA Ken'ichi
6651b7d159
Parse IFD structures and record the context in Tag.
...
In the Exif specification, IFDs may be nested and chained.
The interpretation of a tag value depends on the IFD in which it
appears, so the context is added into Tag.
2016-11-23 19:06:38 +09:00
KAMADA Ken'ichi
eaaad2418f
Parse DOUBLE fields.
2016-11-19 20:46:49 +09:00
KAMADA Ken'ichi
60b6455905
Parse FLOAT fields.
2016-11-19 20:43:41 +09:00
KAMADA Ken'ichi
2bb71cfefb
Parse SRATIONAL fields.
2016-11-19 20:28:17 +09:00
KAMADA Ken'ichi
0741492615
Parse SLONG fields.
2016-11-19 20:21:08 +09:00
KAMADA Ken'ichi
4acfa58e44
Parse SSHORT fields.
2016-11-19 20:16:49 +09:00
KAMADA Ken'ichi
2612b22d54
Parse UNDEFINED fields.
2016-11-19 20:10:12 +09:00
KAMADA Ken'ichi
471f9394c4
Parse SBYTE fields.
2016-11-17 21:32:17 +09:00
KAMADA Ken'ichi
3788c45482
Parse RATIONAL fields.
2016-11-17 21:14:07 +09:00
KAMADA Ken'ichi
e84675d5a7
Parse LONG fields.
2016-11-17 21:03:34 +09:00
KAMADA Ken'ichi
111a2fd34c
Test unitlen more.
2016-11-16 23:16:53 +09:00
KAMADA Ken'ichi
a8620a1ff6
Pre-allocate a Vec since the count of a TIFF field value is known.
2016-11-16 23:13:29 +09:00
KAMADA Ken'ichi
6225236870
Adjust parse_ascii() tester to match with others.
2016-11-04 22:11:57 +09:00
KAMADA Ken'ichi
b86c74856c
Test parse_short().
2016-11-03 19:52:18 +09:00
KAMADA Ken'ichi
8bff68fccc
Implement and test parse_byte().
2016-11-03 19:49:10 +09:00
KAMADA Ken'ichi
4175aa5bc4
Test to ensure that usize can hold a 32-bit offset.
2016-11-03 18:58:32 +09:00
KAMADA Ken'ichi
6f9be2c2a9
Return a usize for the unit length from get_type_info().
2016-11-03 18:51:54 +09:00
KAMADA Ken'ichi
2940079ae9
Fix loadu16/32 so that they do not access invalid memory.
2016-10-28 05:37:39 +09:00