![]() ![]() I don't encourage you to use the wrong type, however we provide this capability. You can set a metadatum to a value and/or type of your choice and I've used that to set Long and SShort. We don't enforce the types of data according to the specification. We overload operator=, so to get a Short, use: exifData = (const int16_t) 8 Įxiv2 is not a metadata policeman. To explain your C++ code, please see the document: Original.jpg SLong 1 top, leftĥ43 $ As you see, exiftool has used Short. Here's the data in your files: 542 $ exiv2 -pa -grep image.orientation/i *.jpgĮxiftool.jpg Short 1 left, bottomĮxiv2.jpg SLong 1 left, bottom Bit 0 is left-right, Bit 1 is up-down, Bit 2 is 0/90 rotation. Incidentally, you should consider the value of Orientation to be a bit-mask. For sure, the Mac's Preview.app doesn't understand Orientation unless it's a Short (as Specified by Exif on page 16) % Total % Received % Xferd Average Speed Time Time Time Currentġ00 6599k 100 6599k 0 0 1254k 0 0:00:05 0:00:05 -:-:- 1354kĥ05 $ exiv2 -pa -grep orientation/i Stonehenge.jpgĥ06 $ exiv2 -M'set 8' Stonehenge.jpgĥ07 $ exiv2 -pa -grep orientation/i Stonehenge.jpgĮ Short 1 left, bottomĥ08 $ exiv2 -M'set SShort 8' Stonehenge.jpgĥ09 $ exiv2 -pa -grep orientation/i Stonehenge.jpgĮ SShort 1 left, bottomĥ10 $ exiv2 -M'set Long 8' Stonehenge.jpgĥ11 $ exiv2 -pa -grep orientation/i Stonehenge.jpgĮ Long 1 left, bottomĥ12 $ I wouldn't like to offer an opinion about which applications handle the Orientation flag well. However, you can specify other types if you wish with the syntax: $ exiv2 -M'set ' file. When you set a value of '1', the command-line program defaults to Short. The Exif specification provides for 8 types of data.
0 Comments
Leave a Reply. |