From 46e597df44402086edd010b69702c2de52b75fc8 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Sun, 1 May 2011 22:22:32 +0200 Subject: initial upload to branch 'touchcol'. see file 'HISTORY' for changes --- tools/convpic/bmp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools/convpic/bmp.c') diff --git a/tools/convpic/bmp.c b/tools/convpic/bmp.c index 0829302..0357988 100644 --- a/tools/convpic/bmp.c +++ b/tools/convpic/bmp.c @@ -89,7 +89,8 @@ bool cBMPFile::Load(GLCD::cImage & image, const std::string & fileName) long iSize; uint32_t x, y; uint16_t iRead; - uint8_t * bitmap = NULL; +// uint8_t * bitmap = NULL; + uint32_t *bitmap = NULL; bool bInvert = false; if (fileName.length() > 0) @@ -163,7 +164,8 @@ bool cBMPFile::Load(GLCD::cImage & image, const std::string & fileName) image.SetWidth(bmpHeader.bmpWidth); image.SetHeight(bmpHeader.bmpHeight); image.SetDelay(100); - bitmap = new unsigned char[bmpHeader.bmpHeight * ((bmpHeader.bmpWidth + 7) / 8)]; +// bitmap = new unsigned char[bmpHeader.bmpHeight * ((bmpHeader.bmpWidth + 7) / 8)]; + bitmap = new uint32_t [bmpHeader.bmpHeight * bmpHeader.bmpWidth]; if (!bitmap) { fprintf(stderr, "ERROR: cannot allocate memory\n"); @@ -260,7 +262,8 @@ bool cBMPFile::Save(const GLCD::cBitmap * bitmap, const std::string & fileName) char Dummy = 0x00; uint32_t x, y; uint16_t iWrote; - const uint8_t * bmpdata = bitmap->Data(); +// const uint8_t * bmpdata = bitmap->Data(); + const uint32_t * bmpdata = bitmap->Data(); if (bitmap && bitmap->Width() > 0 -- cgit v1.2.3