Bug #586
ValueType<T> constructor makes assumptions of the endianness of the machine
90%
Description
If I use the following code on Intel (little endian) machines:
exifData["Exif.Image.XResolution"] = Exiv2::ShortValue(37);
I get an expected resolution of 37 in the final image. However on
PowerPC (big endian) the bytes are swapped and the resolution value is
a lot bigger.
Reported by Dimitri in http://uk.groups.yahoo.com/group/exiv2/message/1449
Additional information:
The idea is that Exiv2 doesn't need to know the endianness of the machine in the first place - only that used in the TIFF data. This case violates this principle and makes an assumption for the endianness of the machine.
History
Updated by Dimitri Schoolwerth almost 13 years ago
Fixed by revision 1695, the above code now gives the same result on both little and big endian machines. There's no need anymore to always pass the native endianness as a parameter. Thanks!
Updated by Andreas Huggel almost 13 years ago
This bug remains open pending the removal of the obsolete byteOrder argument after 0.18 is released.