about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-04-24 02:01:54 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-04-24 02:01:54 +0000
commit563b657255bada6b1790be6c2ff201bf84137c5f (patch)
tree517539c87f80a9cd433f0ca8d433453095efb47c /converter
parent28f1083728b43bef203f1d2d6bd42d1a71315dc5 (diff)
downloadnetpbm-mirror-563b657255bada6b1790be6c2ff201bf84137c5f.tar.gz
netpbm-mirror-563b657255bada6b1790be6c2ff201bf84137c5f.tar.xz
netpbm-mirror-563b657255bada6b1790be6c2ff201bf84137c5f.zip
Fix bug: 12 bit output when 8 would do
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1198 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/other/pnmtops.c2
1 files changed, 2 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