TIFFTAG_EXIFIFD(34665) tag data type in latest photoshop software and the version of libtiff library

  • 1
  • Question
  • Updated 3 years ago
Hello Everyone,

TIFFTAG_EXIFIFD data type is changed to IFD8(IFD and IFD8 data types are newly introduced) in libtiff 4.0.0 version. Does photoshop is using latest data type for TIFFTAG_EXIFIFD tag or using the earlier data type Long?.

Regards,
sathish.
Photo of Sathish Samayam

Sathish Samayam

  • 6 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
IFD8 is only for BIGTIFF files (going over 4 Gig).
Photoshop can read BIGTIFF files, but cannot write them at this time.
Photo of Sathish Samayam

Sathish Samayam

  • 6 Posts
  • 0 Reply Likes
Actually,the problem is in our product we are writing the TIFFTAG_EXIFIFD tag as IFD8. If we are trying to open the same tif file in Photoshop CS5 and CS6 getting the following error:
“ Could not complete your request because it was not the right kind of document”.

we are using libtiff version 4.0.0 in out software. I have changed in our code to write the TIFFTAG_EXIFIFD as LONG data type to the tif file. In this case , tif file is successfully opened in Photoshop CS5.

we are thinking that Photoshop will not aware of IFD8 data type because it is using libtiff 3.9.5 version.

does it correct?. could you please confirm.

Regards,
sathish.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
You only write an IFD entry as an 8 byte value if you are using BIGTIFF, which has a different header.
If you try to write an 8 byte IFD value in a normal TIFF document, then you have ignored the TIFF spec and that file won't be readable.

Photoshop doesn't use LibTIFF.
Photo of Sathish Samayam

Sathish Samayam

  • 6 Posts
  • 0 Reply Likes
Thank you, Chris,

That means, in the normal TIFF document we need to write TIFFTAG_EXIFIFD as LONG data type and for the BIFTIFF we need to write it as IFD8.

Could you please confirm.

Regards,
sathish.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
Yes, TIFF still requires that the IFD tag is 4 bytes long.
Only BIGTIFF allows for longer IFD (and offset) tags.
Photo of Sathish Samayam

Sathish Samayam

  • 6 Posts
  • 0 Reply Likes
one last confirmation , Chris. IFD and IFD8 data types are newly introdcued. which one we need to use LONG or IFD for normal TIFF file.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
The IFD8 type is ONLY for BIGTIFF files.
Normal TIFF files must use the IFD (4 byte) type.
Photo of Sathish Samayam

Sathish Samayam

  • 6 Posts
  • 0 Reply Likes
Thank you so much , Chris for your quick replies.

Regards,
sathish.
Photo of Sathish Samayam

Sathish Samayam

  • 6 Posts
  • 0 Reply Likes
Chris,

I think , Photoshop CS5 and CS6 are writing the TIFFTAG_EXIFIFD tag as TIFF_LONG for normal TIFF files.

Is there any plan to change it to TIFF_IFD?.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
No, because it has historically been written with multiple types (TIFF_LONG, TIFF_ULONG, etc.). And Photoshop's TIFF implementation is already designed for compatibility with many other applications.

And TIFF_LONG is a 4 byte type, which is appropriate because Photoshop is only writing TIFF files that can go to 4 Gig (not BIGTIFF).