#207 Values of some metadata have changed representation

None
closed
Hervé Drolon
None
5
2013-01-09
2012-03-07
Christian Heimes
No

Some metadata values have a different represention. For example StripByteCounts and StripOffsets used to be a string with the decimal representation. Now they contain the data as bytes.

expected in 3.15.1:
StripByteCounts: "6697"
StripOffsets: "8"

since 3.15.3 CVS:
StripByteCounts: ")\x1a"
StripOffsets: "\x08"

ord("\x08")
8
ord(")") + (ord("\x1a") << 8)
6697

Discussion

  • Hervé Drolon
    Hervé Drolon
    2012-03-11

    LibTIFF 4 introduced 64-bit data types for
    - TIFFTAG_FREEBYTECOUNTS
    - TIFFTAG_FREEOFFSETS
    - TIFFTAG_STRIPBYTECOUNTS
    - TIFFTAG_STRIPOFFSETS
    - TIFFTAG_TILEBYTECOUNTS
    - TIFFTAG_TILEOFFSETS

    The fix for FreeImage consists to:
    - add new 64-bit data types FIINT64, FIUINT64
    - add new 64-bit metadata types to FREE_IMAGE_MDTYPE (FIDT_LONG8, FIDT_SLONG8, FIDT_IFD8)
    - update the TagToString conversion function

    Changes are available in the CVS.

    Hervé

     
  • Thanks, the bug fix in CSV works well. But now the orientation information has vanished. FreeImage used to show 'top, left side' as orientation of my test tiff. Now it doesn't print any orientation information.

     
  • Hervé Drolon
    Hervé Drolon
    2012-03-11

    This is strange as nothing changed regarding the "Orientation" tag.
    Also, I cannot reproduce this problem in MS Win 32-bit.
    Maybe another 64-bit problem ?

     
  • I misinterpreted the outcome of the tests. The "Orientation" tag isn't missing. To the contrary FreeImage adds an "Orientation" tag when it saves a TIFF file. I don't consider this a bug. Everything works as expected.

     
  • Hervé Drolon
    Hervé Drolon
    2013-01-09

    • status: pending --> closed
    • milestone: -->