libtiff doesn't seem to like zero-length custom tags such as Photoshop or Microscope:
convert: ./123770.tif: Null count for "Photoshop" (type 1, writecount -3, passcount 1). `_TIFFVSetField' @ error/tiff.c/TIFFErrors/562.
Since this is a TIFFError, convert exits with a nonzero return code, although the file is written (maybe incomplete).
A zero-length tag doesn't make much sense here anyway, so could you please test whether the profile is empty before writing a 37724 or 34118 tag in TIFFSetProfiles?
Currently, I don't know whether this also applies to "standard" tags such as TIFFTAG_ICCPROFILE.
6.8.3-8: Error writing zero-length TIFF tags
Re: 6.8.3-8: Error writing zero-length TIFF tags
This applies to any TIFF tag with variable length.
Here ist a simple EPS file that causes the error (0 byte 8bim profile) when converted to TIFF:
Here ist a simple EPS file that causes the error (0 byte 8bim profile) when converted to TIFF:
Code: Select all
%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox: 0 0 247 175
%%BeginSetup
%%EndSetup
%%EndComments
%%BeginProlog
28.346000 -28.346000 scale
-3.450000 -8.550000 translate
%%EndProlog
%BeginPhotoshop: 0
%EndPhotoshop
0.100000 setlinewidth
[] 0 setdash
0 setlinejoin
1.000000 1.000000 1.000000 setrgbcolor
newpath 3.500000 2.450000 moveto 3.500000 8.500000 lineto 12.100000 8.500000 lineto 12.100000 2.450000 lineto fill
0.000000 0.000000 0.000000 setrgbcolor
newpath 3.500000 2.450000 moveto 3.500000 8.500000 lineto 12.100000 8.500000 lineto 12.100000 2.450000 lineto closepath stroke
showpage
Re: 6.8.3-8: Error writing zero-length TIFF tags
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.4-0 Beta available by sometime tomorrow. Thanks.