Author Topic: PI cannot open TIFF files generated by Adobe Lightroom 3.2  (Read 3381 times)

Offline Tony Morris

  • Newcomer
  • Posts: 30
    • View Profile
    • http://www.msas.org.uk
PI cannot open TIFF files generated by Adobe Lightroom 3.2
« on: 2010 September 19 03:25:22 »
Juan

I have been using Adobe Lightroom 3.2 to convert some CR2 files to uncompressed 16bit TIFF's.
Unfortunately PI 1.6, or 1.5 will not open them.
I get this error message on both Linux and Windows versions of PI:-

TiFF Error (Filename) Tag 42034: Rational with zero denominator (num=0)

I tried converting the file in Lightroom 2.5 and PI opens the files ok, so it looks like Adobe have changed something, but
the TIFF files generated by LR3.2 will still open ok in any other image viewing/manipulation program on both my Linux Ubuntu and Windows XP machines
(I have tried quite a few on both platforms and the only one that complains is the GIMP but that is due to bit depth).

I can send you the files as required.

Regards
Tony


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6719
    • View Profile
    • http://pixinsight.com/
Re: PI cannot open TIFF files generated by Adobe Lightroom 3.2
« Reply #1 on: 2010 September 20 13:13:26 »
Hi Tony,

Yes, I'd need to take a look at one of these TIFF files if you can upload it somewhere.

The current version of the LibTIFF library that PixInsight uses to support TIFF is somewhat outdated (3.8.2). The next version will use the latest LibTIFF version, which probably will fix these problems. Anyway I am very interested in analyzing one of these problematic TIFF files.

Thank you.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Tony Morris

  • Newcomer
  • Posts: 30
    • View Profile
    • http://www.msas.org.uk
Re: PI cannot open TIFF files generated by Adobe Lightroom 3.2
« Reply #2 on: 2010 September 20 13:52:59 »
Juan

The file is 70MB, where or how can I post this to you?

Thanks

Tony

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6719
    • View Profile
    • http://pixinsight.com/
Re: PI cannot open TIFF files generated by Adobe Lightroom 3.2
« Reply #3 on: 2010 September 20 14:24:25 »
Tony,

Could you crop a small section of the image and save it with the other application? I really don't need the whole image; just the TIFF tags which will be included even with a small crop of, say, 256x256 pixels. Just make sure PixInsight cannot open the small TIFF, and send it to me compressed as a zip file via email (to the support email account for example).
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Tony Morris

  • Newcomer
  • Posts: 30
    • View Profile
    • http://www.msas.org.uk
Re: PI cannot open TIFF files generated by Adobe Lightroom 3.2
« Reply #4 on: 2010 September 20 15:05:30 »
Juan

Sent as as requested to the support account.

Down-sampled in Lightroom 3.2, PI will not open,other viewers will.

Tony

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6719
    • View Profile
    • http://pixinsight.com/
Re: PI cannot open TIFF files generated by Adobe Lightroom 3.2
« Reply #5 on: 2010 September 29 03:31:08 »
Hi Tony,

Thank you for sending your image. It has allowed me to confirm and identify the problem.

TIFF tag 42034 is the EXIF LensSpecification tag. This tag stores four rational values (four x/y items). The problem is that when no lens data are available, this tag stores four 0/0 rationals. See CIPA DC-008-2010, page 67.

This is actually a problem (bug would be more appropriate?) with the LibTIFF library that PixInsight uses in its TIFF support module. When LibTIFF founds a 0/0 value, it throws an error because 0/0 is not a valid rational. However, in this case 0/0 is a conventional value used to denote no LensSpecification data. This is a combination of bad design on the EXIF end (using 0/0 is definitely a *bad* idea) and lack of up-to-date decoding capabilities in the LibTIFF end.

Workaround: Tell Lightroom to not store EXIF lens data, if possible, or provide valid lens data for your images, if possible.

I guess the only solution for fixing this bug will be catching the 42034 tag manually, which requires hacking LibTIFF source code. Hmmm... I hate when this happens.

Thanks for your help.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/