properly handle exif orientation
translate the tag value to string using the exiftool way, to be compatible with RT. Fixes issue #4 (cherry picked from commit a4621f54b2ac82b679cf9d865a0a3e4a2ed9c468)
This commit is contained in:
parent
e5c8ceac5f
commit
df39e13cf7
@ -256,7 +256,23 @@ FramesData::FramesData(const Glib::ustring &fname) :
|
||||
}
|
||||
|
||||
if (find_tag(Exiv2::orientation)) {
|
||||
orientation = validateUft8(pos->print(&exif)); // validateUft8 (#5923) still needed?
|
||||
static const std::vector<std::string> ormap = {
|
||||
"Unknown",
|
||||
"Horizontal (normal)",
|
||||
"Mirror horizontal",
|
||||
"Rotate 180",
|
||||
"Mirror vertical",
|
||||
"Mirror horizontal and rotate 270 CW",
|
||||
"Rotate 90 CW",
|
||||
"Mirror horizontal and rotate 90 CW",
|
||||
"Rotate 270 CW",
|
||||
"Unknown"
|
||||
};
|
||||
auto idx = pos->toLong();
|
||||
if (idx >= 0 && idx < long(ormap.size())) {
|
||||
orientation = ormap[idx];
|
||||
}
|
||||
//orientation = pos->print(&exif);
|
||||
}
|
||||
|
||||
if (find_tag(Exiv2::lensName)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user