about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY2
-rw-r--r--lib/libppm1.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 45c9b1f0..f93c3c87 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,8 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.40.00
 
+              libnetpbm: pbm_readppminit: read PBM as maxval of 255, not 1.
+
               pbmtonokia: fail if input is > 255 x 255.  Thanks Paul Bolle
               <pebolle@tiscali.nl>.
 
diff --git a/lib/libppm1.c b/lib/libppm1.c
index a7ea78cf..425f2ab1 100644
--- a/lib/libppm1.c
+++ b/lib/libppm1.c
@@ -135,7 +135,8 @@ ppm_readppminit(FILE *   const fileP,
 
     case PBM_TYPE:
         *formatP = realFormat;
-        *maxvalP = 1;
+        /* See comment in pgm_readpgminit() about this maxval */
+        *maxvalP = PPM_MAXMAXVAL;
         pbm_readpbminitrest(fileP, colsP, rowsP);
         break;