From 787b64999cc12502480e0e2b0d86de99853adf9a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 25 Nov 2003 10:53:57 +0000 Subject: [PATCH] From Eric Hammil, support for compute the dimensions when the file specified size is zero. --- src/osgPlugins/bmp/ReaderWriterBMP.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/bmp/ReaderWriterBMP.cpp b/src/osgPlugins/bmp/ReaderWriterBMP.cpp index bd678b57e..5ecd8b9a0 100644 --- a/src/osgPlugins/bmp/ReaderWriterBMP.cpp +++ b/src/osgPlugins/bmp/ReaderWriterBMP.cpp @@ -226,7 +226,8 @@ int *numComponents_ret) case 1: ncomp = BW; // actually this is a 256 colour, paletted image inf.Colorbits=8; // so this is how many bits there are per index - inf.ColorUsed=256; // and number of colours used + //inf.ColorUsed=256; // and number of colours used + if(!inf.ColorUsed) inf.ColorUsed=256; /*the bitmap has 256 colours if ColorUsed = 0 otherwise as many as stored in ColorUsed*/ cols=imbuff; // colour palette address - uses 4 bytes/colour break; case 2: