Fix to BMP loader.

This commit is contained in:
Robert Osfield
2002-02-09 10:50:09 +00:00
parent ed45cccc25
commit 16ada0fa3b
2 changed files with 5 additions and 5 deletions

View File

@@ -6,18 +6,18 @@ C++FILES = \
TARGET_BASENAME = osgdb_bmp
TARGET_LIB_FILES = lib$(TARGET_BASENAME).$(DL_EXT)
LOADABLE = $(OSGHOME)/lib/osgPlugins/$(TARGET_BASENAME).$(DL_EXT)
LIB=
LODABLE = $(OSGHOME)/lib/osgPlugins/$(TARGET_BASENAME).$(DL_EXT)
TARGET_LOADER_FILES = osgPlugins/$(TARGET_BASENAME).$(DL_EXT)
LIBS = $(GL_LIBS) -losg -losgDB
MACOSXLIBS = -L$(OSGOME)/lib -losg -losgDB -lstdc++
MACOSXLIBS = -L$(OSGHOME)/lib -losg -losgUtil -losgDB -ldl -lstdc++
C++FLAGS += -I. -I$(OSGHOME)/include
LDFLAGS += -L$(OSGHOME)/lib
include $(OSGHOME)/Make/makerules

View File

@@ -188,7 +188,7 @@ int *numComponents_ret)
inf.Colorbits=cbits;
inf.ColorUsed=pow(2.0,inf.Colorbits); // infer the colours
}
long size = hd.siz[1]*65536+hd.siz[0];
long size = (unsigned short)hd.siz[1]*65536+(unsigned short)hd.siz[0];
int ncpal=4; // default number of colours per palette entry
size -= sizeof(bmpheader)+infsize;
if (inf.ImageSize<size) inf.ImageSize=size;