about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/other/pnmtops.c2
-rw-r--r--doc/HISTORY3
2 files changed, 5 insertions, 0 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c
index b43cb483..1568bd28 100644
--- a/converter/other/pnmtops.c
+++ b/converter/other/pnmtops.c
@@ -1001,6 +1001,8 @@ computeDepth(xelval         const inputMaxval,
         *bitspersampleP = 2;
     else if (bitsRequiredByMaxval <= 4)
         *bitspersampleP = 4;
+    else if (bitsRequiredByMaxval <= 8)
+        *bitspersampleP = 8;
     else {
         /* Post script level 2 defines a format with 12 bits per sample,
            but I don't know the details of that format (both RLE and
diff --git a/doc/HISTORY b/doc/HISTORY
index 7397c901..65a47c43 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -14,6 +14,9 @@ not yet  BJH  Release 10.51.00
               pnmsmooth: Don't display pnmconvol messages (i.e. run
               pnmconvol with -quiet).
 
+              pnmtops: fix bug: 12 bits per sample output when 8 would do.
+              Introduced in 10.40.
+
               palmtopnm: fix for pixel size 16.  Thanks Paul Bolle
               <pebolle@tiscali.nl>.