about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/ppm/leaftoppm.c4
-rw-r--r--doc/HISTORY3
2 files changed, 5 insertions, 2 deletions
diff --git a/converter/ppm/leaftoppm.c b/converter/ppm/leaftoppm.c
index 889400f6..bda44494 100644
--- a/converter/ppm/leaftoppm.c
+++ b/converter/ppm/leaftoppm.c
@@ -88,9 +88,9 @@ leaf_init(FILE *  const fp,
                 for (i=0; i < 256; ++i)
                     PPM_PUTR(colors[i], fgetc(fp));
                 for (i=0; i < 256; ++i)
-                    PPM_PUTR(colors[i], fgetc(fp));
+                    PPM_PUTG(colors[i], fgetc(fp));
                 for (i=0; i < 256; ++i)
-                    PPM_PUTR(colors[i], fgetc(fp));
+                    PPM_PUTB(colors[i], fgetc(fp));
                 *ncolorsP = ncolors;
             } else {
                 /* 24-bit image */
diff --git a/doc/HISTORY b/doc/HISTORY
index 203da01d..79c84c8d 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,9 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.46.00
 
+              leaftoppm: fix bug: uses red channel as all three channels;
+              (produces grayscale output).
+
               pbmtomrf, mrftopbm: fix crashes, incorrect output in all
               cases.  Broken forever.