summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/bmp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index 1d4d8147b1..5f596efdda 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -222,8 +222,8 @@ int read_bmp_file(char* filename,
222 } 222 }
223 223
224 /* Use the darker palette color as foreground on mono bitmaps */ 224 /* Use the darker palette color as foreground on mono bitmaps */
225 if(readshort(&fh.BitCount) == 1) { 225 if(depth == 1) {
226 if(brightness(palette[0]) > brightness(palette[1])) 226 if(brightness(palette[0]) < brightness(palette[1]))
227 invert_pixel = 1; 227 invert_pixel = 1;
228 } 228 }
229 229
@@ -260,12 +260,12 @@ int read_bmp_file(char* filename,
260 /* Mono -> Mono */ 260 /* Mono -> Mono */
261 for (col = 0; col < width; col++) { 261 for (col = 0; col < width; col++) {
262 ret = getpix(col, bmpbuf) ^ invert_pixel; 262 ret = getpix(col, bmpbuf) ^ invert_pixel;
263 if (ret == 1) { 263 if (ret) {
264 bitmap[width * ((height - row - 1) / 8) + col] 264 bitmap[width * ((height - row - 1) / 8) + col]
265 &= ~ 1 << ((height - row - 1) % 8); 265 |= 1 << ((height - row - 1) % 8);
266 } else { 266 } else {
267 bitmap[width * ((height - row - 1) / 8) + col] 267 bitmap[width * ((height - row - 1) / 8) + col]
268 |= 1 << ((height - row - 1) % 8); 268 &= ~ 1 << ((height - row - 1) % 8);
269 } 269 }
270 } 270 }
271#if LCD_DEPTH == 2 271#if LCD_DEPTH == 2