Bug #586

ValueType<T> constructor makes assumptions of the endianness of the machine

Added by Andreas Huggel over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

90%

Category:metadata
Target version:0.18

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

#1 Updated by Dimitri Schoolwerth over 8 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!

#2 Updated by Andreas Huggel over 8 years ago

r1695

This bug remains open pending the removal of the obsolete byteOrder argument after 0.18 is released.

#3 Updated by Andreas Huggel over 8 years ago

  • Target version set to 0.18

#4 Updated by Andreas Huggel over 8 years ago

  • Status changed from New to Resolved

#5 Updated by Andreas Huggel over 8 years ago

  • % Done changed from 0 to 100

#6 Updated by Andreas Huggel over 8 years ago

  • % Done changed from 100 to 90

#7 Updated by Andreas Huggel over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux