From 0178c698712832d4d19e9303edacbe7e8a034891 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Wed, 29 Jun 2011 01:17:41 +0200 Subject: fix saving of PBMs, fix crtfont and genfont; remove cBitmap::LoadPBM()/::SavePBM (use cPMFile::Load()/Save()) instead; fixed cBitmap::SubBitmap(); add static methods for converting from and to 1BPP --- glcdgraphics/bitmap.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'glcdgraphics/bitmap.h') diff --git a/glcdgraphics/bitmap.h b/glcdgraphics/bitmap.h index 8067cc3..dcfa26d 100644 --- a/glcdgraphics/bitmap.h +++ b/glcdgraphics/bitmap.h @@ -133,9 +133,14 @@ public: void SetProcessAlpha(bool procAlpha) { processAlpha = procAlpha; } bool IsProcessAlpha(void) const { return processAlpha; } + + static const unsigned char* ConvertTo1BPP(const cBitmap & bitmap, int threshold = 127); + static const cBitmap* ConvertFrom1BPP(const unsigned char* monobmp, int w, int h, uint32_t fg = cColor::White, uint32_t bg = cColor::Black); +#if 0 bool LoadPBM(const std::string & fileName); void SavePBM(const std::string & fileName); +#endif }; } // end of namespace -- cgit v1.2.3