Project

General

Profile

Bug #586

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

Added by Andreas Huggel almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
metadata
Target version:
Start date:
Due date:
% Done:

90%

Estimated time:

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 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!

#2

Updated by Andreas Huggel almost 13 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 almost 13 years ago

  • Target version set to 0.18
#4

Updated by Andreas Huggel almost 13 years ago

  • Status changed from New to Resolved
#5

Updated by Andreas Huggel almost 13 years ago

  • % Done changed from 0 to 100
#6

Updated by Andreas Huggel almost 13 years ago

  • % Done changed from 100 to 90
#7

Updated by Andreas Huggel almost 13 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF