kamadak / exif-rs

Exif parsing library written in pure Rust
BSD 2-Clause "Simplified" License
190 stars 42 forks source link

Orientation reading is incorrect #6

Closed victorcrimea closed 3 years ago

victorcrimea commented 5 years ago

Library incorrectly reads content of Orientation tag from some images taken with Samsung Galaxy S7(I don't know if it's relevant to other cameras). Following two images have taken in landscape and portrait. But library always return "0" for Orientation tag value.

Other software like exiftool or shotwell viewer is able to detect difference.

20181209_134245 20181209_141622

kamadak commented 5 years ago

Could you share your code fragment to show how you read Orientation tag?

The library correctly reads Orientation tags from your examples in my environment. Try examples/dumpexif.rs.

% ./dumpexif 49899189-af3c9280-fe63-11e8-9bac-d7156c6a865a.jpg | grep -A1 Orientation
  0/Orientation: row 0 at top and column 0 at left
      Short([1])
--
  1/Orientation: row 0 at top and column 0 at left
      Short([1])
% ./dumpexif 49899201-b663a080-fe63-11e8-9df9-09cce64def7b.jpg | grep -A1 Orientation
  0/Orientation: row 0 at right and column 0 at top
      Short([6])
--
  1/Orientation: row 0 at right and column 0 at top
      Short([6])
kamadak commented 3 years ago

Closing because the problem is not reproducible in the author's environment and no further information have been provided. Please reopen if the problem is not solved yet.