0

I have encountered the following problem for 2 days, without a solution:

$ convert imag0001.TIF imag0001.jpg
convert-im6.q16: Unknown field with tag 34391 (0x8657) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/985.
convert-im6.q16: Unknown field with tag 34392 (0x8658) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/985.
convert-im6.q16: imag0001.TIF: Null count for "Tag 34391" (type 1, writecount -3, passcount 1). `_TIFFVSetField' @ error/tiff.c/TIFFErrors/606.
convert-im6.q16: no images defined `imag0001.jpg' @ error/convert.c/ConvertImageCommand/3229.

Please help. Thanks in advance

Regards

zx485
  • 2,865

2 Answers2

2

Thanks for your advice.

I tried your suggestion, still failing

$ convert -define tiff:ignore-tags=34391 imag0001.TIF imag0001.jpg
convert-im6.q16: The value of field_readcount and field_writecount must be greater than or equal to -3 and not zero.. `TIFFMergeFieldInfo' @ error/tiff.c/TIFFErrors/542.

I found a solution;

  1. import imag0001.TIF image to GIMP
  2. export the image as imag0001.jpg (not necessary making any editing)

It works without problem. The steps are very simple

Regards

andrew.46
  • 39,359
1

You can try ignoring the problematic tag:

convert -define tiff:ignore-tags=34391 imag0001.TIF imag0001.jpg

Failing that, please share your unhappy TIFF via Google Drive, Github, Dropbox or similar.


Alternatively, if you install libtiff, you will get a tool called tiffset which you could use to "unset" (i.e. remove) the problematic tag:

tiffset -u 34391 image0001.tif

You can probably do the same thing with exiftool, but I can only tell you the command if you share your file.

Mark Setchell
  • 226
  • 1
  • 6