Remove ImageWidth/Length from tests/exif.jpg for conformance to Exif.
This commit is contained in:
parent
078bfcdc78
commit
98cb8b914c
|
@ -38,7 +38,7 @@ fn main() {
|
||||||
// To obtain a string representation, `Value::display_as` can be used
|
// To obtain a string representation, `Value::display_as` can be used
|
||||||
// for any tag.
|
// for any tag.
|
||||||
let tag_list = [tag::ExifVersion,
|
let tag_list = [tag::ExifVersion,
|
||||||
tag::ImageWidth,
|
tag::PixelXDimension,
|
||||||
tag::XResolution,
|
tag::XResolution,
|
||||||
tag::ImageDescription,
|
tag::ImageDescription,
|
||||||
tag::DateTime];
|
tag::DateTime];
|
||||||
|
@ -50,9 +50,9 @@ fn main() {
|
||||||
|
|
||||||
// To get unsigned integer value(s) from either of BYTE, SHORT,
|
// To get unsigned integer value(s) from either of BYTE, SHORT,
|
||||||
// or LONG, `Value::get_uint` or `Value::iter_uint` can be used.
|
// or LONG, `Value::get_uint` or `Value::iter_uint` can be used.
|
||||||
if let Some(field) = reader.get_field(tag::ImageWidth, false) {
|
if let Some(field) = reader.get_field(tag::PixelXDimension, false) {
|
||||||
if let Some(width) = field.value.get_uint(0) {
|
if let Some(width) = field.value.get_uint(0) {
|
||||||
println!("Image width is {}.", width);
|
println!("Valid width of the image is {}.", width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
tests/exif.jpg
BIN
tests/exif.jpg
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue