about summary refs log tree commit diff
path: root/converter/other/bmptopnm.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/bmptopnm.c')
-rw-r--r--converter/other/bmptopnm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/converter/other/bmptopnm.c b/converter/other/bmptopnm.c
index ad92db26..787b9020 100644
--- a/converter/other/bmptopnm.c
+++ b/converter/other/bmptopnm.c
@@ -250,6 +250,11 @@ GetCieXyzTriple(FILE *         const ifP) {
 
 
 
+static struct pixelformat
+defaultPixelformat(unsigned int const bitCount);
+
+
+
 static void
 readOffBytes(FILE * const fp, unsigned int const nbytes) {
 /*----------------------------------------------------------------------------
@@ -337,6 +342,8 @@ readOs2InfoHeaderRest(FILE *                 const ifP,
         pm_error("Unrecognized bits per pixel in OS/2 BMP file header: %d",
                  headerP->cBitCount);
                  
+    headerP->pixelformat = defaultPixelformat(headerP->cBitCount);
+
     headerP->compression = BMPCOMP_RGB;
 }