[OT?] GhostScript bug writing tiffg3 to stdout
Tilman Schmidt
tilman at imap.cc
Thu Jul 7 10:19:47 PDT 2011
It seems that GhostScript version 8.64 has a bug in the tiffg3 driver when writing to standard output. Comparing the output of the two commands:
% /usr/bin/gs -q -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=tiffg3 -sOutputFile=- -r204x196 -sPAPERSIZE=a4 /var/spool/cups/tmp/pstofaxvhVNCp -sstdout=/dev/null > /tmp/testpstofax1.tiff
% /usr/bin/gs -q -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=tiffg3 -sOutputFile=- -r204x196 -sPAPERSIZE=a4 /var/spool/cups/tmp/pstofaxvhVNCp -sstdout=/dev/null | cat > /tmp/testpstofax2.tiff
Only the first one (/tmp/testpstofax1.tiff) is a valid TIFF file.
The second one (/tmp/testpstofax2.tiff) causes consumers like capifax
or gwenview to choke, complaining:
Invalid strip byte count, strip 0.
Looking closer, I notice that the second one is longer:
% ls -l /tmp/testpstofax*
-rw-r--r-- 1 ts users 40492 7. Jul 19:08 /tmp/testpstofax1.tiff
-rw-r--r-- 1 ts users 40501 7. Jul 19:08 /tmp/testpstofax2.tiff
More precisely, it has the nine additional bytes
"00 ff ff ff ff 00 00 00 00" appended with respect to the first one.
For me this means that GhostScript cannot be used in a pipe.
Comments?
More information about the cups
mailing list