summaryrefslogtreecommitdiff
path: root/tools/convpic/bmp.c
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2011-05-01 22:22:32 +0200
committermrwastl <mrwastl@users.sourceforge.net>2011-05-01 22:22:32 +0200
commit46e597df44402086edd010b69702c2de52b75fc8 (patch)
treefa9528f19f951b765b071c239b09547cf69bd169 /tools/convpic/bmp.c
parent57729cf285b058d192a60bd7fce1b2d29bdd9650 (diff)
downloadgraphlcd-base-46e597df44402086edd010b69702c2de52b75fc8.tar.gz
graphlcd-base-46e597df44402086edd010b69702c2de52b75fc8.tar.bz2
initial upload to branch 'touchcol'. see file 'HISTORY' for changes
Diffstat (limited to 'tools/convpic/bmp.c')
-rw-r--r--tools/convpic/bmp.c9
1 files changed, 6 insertions, 3 deletions
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