From a0e273fdca741b8805e19deeb8019fa42c4e64ba Mon Sep 17 00:00:00 2001 From: Bob Friesenhahn Date: Sat, 5 Jan 2019 13:56:09 -0600 Subject: Fix tiff2ps error regarding "Inconsistent value of es" by allowing es to be zero. Problem was reported to the tiff mailing list by Julian H. Stacey on January 5, 2019. --- tools/tiff2ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c index d8d3da3a..5660a68b 100644 --- a/tools/tiff2ps.c +++ b/tools/tiff2ps.c @@ -2444,9 +2444,9 @@ PSDataColorContig(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc) unsigned char *cp, c; (void) w; - if( es <= 0 ) + if( es < 0 ) { - TIFFError(filename, "Inconsistent value of es: %d", es); + TIFFError(filename, "Inconsistent value of es: %d (samplesperpixel=%u, nc=%d)", es, samplesperpixel, nc); return; } tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow); -- cgit v1.2.1