diff options
-rw-r--r-- | glcdgraphics/pbm.c | 2 | ||||
-rw-r--r-- | tools/genfont/genfont.c | 7 |
2 files changed, 1 insertions, 8 deletions
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 ) )); } } diff --git a/tools/genfont/genfont.c b/tools/genfont/genfont.c index 980c55b..775d142 100644 --- a/tools/genfont/genfont.c +++ b/tools/genfont/genfont.c @@ -158,13 +158,6 @@ int main(int argc, char *argv[]) } } - // invert image - for(int y=0; y < bitmap->Height(); y++) { - for(int x=0; x < bitmap->Width(); x++) { - bitmap->DrawPixel(x, y, GLCD::cColor(bitmap->GetPixel(x, y)).Invert()); - } - } - if (posX > 0) // write last end marker fprintf(descFile, "%d\n", posX); fileName = outputName + ".pbm"; |