Bob,

There are 2 regression test for writing EXIF IFD: https://gitlab.com/libtiff/libtiff/-/blob/master/test/custom_dir.c and https://gitlab.com/libtiff/libtiff/-/blob/master/test/custom_dir_EXIF_231.c . So it is likely your issue comes from a subtle difference in using the libtiff API compared to those regression tests.

It could help if you bisected which commit changed the behavior

Even


Le 20/12/2023 à 23:06, Bob Friesenhahn via Tiff a écrit :
Recently a volunteer submitted code to GraphicsMagick's TIFF writer to create an EXIF subifd.  When I tested this, it did not work for me. I was using latest libtiff from git.

I did some investigating and found that the code works for libtiff 4.4.0 and 4.5.0 but fails starting with 4.5.1.  Is anyone aware of changes which might cause the issue (or detect a problem which was not detected before)?

The test case writes three identical images in order, each with an identical EXIF IFD.

The final errors reported are:

15:49:49 0:0.005317  0.000u 2345878 tiff.c/AddExifFields/4510/Coder:
  Extracted tag from EXIF 11ah, Field 5, Long2 1, val 17895 XResolution
15:49:49 0:0.005443  0.000u 2345878 tiff.c/TIFFWriteErrors/975/Coder:
  Ignored: Error fetching directory link. (TIFFRewriteDirectory)
15:49:49 0:0.005476  0.000u 2345878 tiff.c/TIFFWriteErrors/975/Coder:
  Ignored: Error fetching directory link. (TIFFRewriteDirectory)
15:49:49 0:0.006473  0.000u 2345878 tiff.c/WriteTIFFImage/6687/Coder:
  Removed broken output file "input_truecolor.tiff"
15:49:49 0:0.006495  0.000u 2345878 constitute.c/WriteImage/2325/Coder:  Returned from "TIFF" encoder, Failed ./utilities/gm convert: TIFF directory is missing required "ImageLength" field. (MissingRequired).

Bob

--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff

Reply via email to