Open hsa00000 opened 1 month ago
Please look for two Orientation fields in your example output. One is for field.ifd_num == exif::In::PRIMARY
and another is for field.ifd_num == exif::In::THUMBNAIL
.
In my environment, your sample code with your test_image.jpg correctly outputs two Orientation fields like this:
...
(tag, value) is ("Orientation", "row 0 at top and column 0 at left")
...
(tag, value) is ("Orientation", "row 0 at right and column 0 at top")
...
Issue Title: Incorrect Orientation Tag Extraction
Description
I am encountering an issue with the
exif
crate where the orientation tag extracted from an image file appears to be incorrect. Specifically, the image's orientation is reported as "row 0 at right and column 0 at top" even though other tools correctly report the orientation as "Horizontal (normal)".Steps to Reproduce
Extract the Exif metadata and check the orientation tag by the
exif
crate.Verify the correct Exif orientation using other tools like
ExifTool
or Python'sPillow
library.Using ExifTool:
Look for the
Orientation
tag in the output.Using Python's Pillow Library:
Compare the orientation tag extracted using the
exif
crate with the correct orientation from the other tools.Expected Behavior
The orientation tag should be reported as "Horizontal (normal)" (Exif value 1).
Actual Behavior
The orientation tag is incorrectly reported as "row 0 at right and column 0 at top".
Code Sample
Here is a code snippet used to extract the Exif metadata:
Exif Output
Comparison with Other Tools
When extracting the same Exif data using other tools like ExifTool or Python's Pillow library, the orientation is reported as "Horizontal (normal)" (Exif value 1).
Attached Files
The attached zip file
test_image.zip
contains the imagetest_image.jpg
which can be used to reproduce the problem. test_image.zip