2002.10.11 22:57 "tiff2ps generates incorrect level 1 images", by William Bader

The change below fixes a problem where "tiff2ps -1e" did not make the scanline buffer long enough when writing rgb triplets. The scanline needs to be 3 X the number of dots or else it will contain an incomplete triplet and programs that try to separate the eps by redefining the colorimage operator will get messed up.

William
http://williambader.com

--- tiff-v3.5.7/tools/tiff2ps.c-        Wed Oct 10 23:54:38 2001
+++ tiff-v3.5.7/tools/tiff2ps.c Fri Sep 27 16:39:37 2002
@@ -1123,8 +1123,10 @@
  case PHOTOMETRIC_PALETTE:
               fprintf(fd, "%s", RGBcolorimage);
               PhotoshopBanner(fd, w, h, 1, 3, "false 3 colorimage");
+         /* 24Sep02 wb add *3 so scanlines contain full rgb triplets */
+         /*   to work with the image operator under level1 or color seps */
              fprintf(fd, "/scanLine %ld string def\n",
-                  (long) ps_bytesperrow);
+                (long) ps_bytesperrow * 3L);
                fprintf(fd, "%lu %lu 8\n",
                  (unsigned long) w, (unsigned long) h);
              fprintf(fd, "[%lu 0 0 -%lu 0 %lu]\n",