about summary refs log tree commit diff
path: root/converter/ppm/ppmtoilbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/ppm/ppmtoilbm.c')
-rw-r--r--converter/ppm/ppmtoilbm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/converter/ppm/ppmtoilbm.c b/converter/ppm/ppmtoilbm.c
index 595aa3f4..c5fa4d00 100644
--- a/converter/ppm/ppmtoilbm.c
+++ b/converter/ppm/ppmtoilbm.c
@@ -2274,6 +2274,7 @@ main(int argc, char ** argv) {
         if (colors == 0)
             pm_error("empty colormap??");
         pm_message("%d colors found in colormap", colors);
+        nPlanes = pm_maxvaltobits(colors-1);
     }
 
     if (maskmethod != mskNone) {