diff options
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/grey_draw.c | 13 | ||||
-rw-r--r-- | apps/plugins/lib/pluginlib_bmp.c | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index 65f2211b7f..6315ad9b1a 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c @@ -719,7 +719,15 @@ void grey_ub_gray_bitmap(const unsigned char *src, int x, int y, int width, grey_ub_gray_bitmap_part(src, 0, 0, width, x, y, width, height); } -static void output_row_grey(uint32_t row, void * row_in, struct scaler_context *ctx) +static void output_row_grey_8(uint32_t row, void * row_in, + struct scaler_context *ctx) +{ + uint8_t *dest = (uint8_t*)ctx->bm->data + ctx->bm->width * row; + rb->memcpy(dest, row_in, ctx->bm->width); +} + +static void output_row_grey_32(uint32_t row, void * row_in, + struct scaler_context *ctx) { int col; uint32_t *qp = (uint32_t*)row_in; @@ -734,6 +742,7 @@ static unsigned int get_size_grey(struct bitmap *bm) } const struct custom_format format_grey = { - .output_row = output_row_grey, + .output_row_8 = output_row_grey_8, + .output_row_32 = output_row_grey_32, .get_size = get_size_grey }; diff --git a/apps/plugins/lib/pluginlib_bmp.c b/apps/plugins/lib/pluginlib_bmp.c index 110e534be0..6b1a54291c 100644 --- a/apps/plugins/lib/pluginlib_bmp.c +++ b/apps/plugins/lib/pluginlib_bmp.c @@ -124,14 +124,7 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst) #endif /* LCD_DEPTH > 1 */ -#ifndef HAVE_BMP_SCALING #include "wrappers.h" /* import the core bmp loader */ #include "recorder/bmp.c" -#else -/* the full 16x16 Bayer dither matrix may be calculated quickly with this table -*/ -const unsigned char dither_table[16] = - { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }; -#endif |