From bd827457475fa714dcc57baf4053e4492635d1fb Mon Sep 17 00:00:00 2001 From: mrwastl Date: Wed, 29 Jun 2011 18:21:15 +0200 Subject: bug fix in cPBMFile::Save() --- glcdgraphics/pbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glcdgraphics/pbm.c') diff --git a/glcdgraphics/pbm.c b/glcdgraphics/pbm.c index 2c83752..d5c0576 100644 --- a/glcdgraphics/pbm.c +++ b/glcdgraphics/pbm.c @@ -182,7 +182,7 @@ bool cPBMFile::Save(cImage & image, const std::string & fileName) for (int y = 0; y < bitmap->Height(); y++) { int startpos = y * ((bitmap->Width() + 7) / 8); for (int x = 0; x < bitmap->Width(); x++) { - if (bmpdata[ y * bitmap->Width() + x ] == cColor::Black) { + if (bmpdata[ y * bitmap->Width() + x ] == cColor::White) { rawdata[ startpos + (x / 8) ] |= (1 << ( 7 - ( x % 8 ) )); } } -- cgit v1.2.3