From e9206717558ed3256e40c4b4e620156492697dc2 Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Wed, 29 Sep 2010 20:38:14 +0000 Subject: imageviewer bmp - drop special case for grey bitmap scaller git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28186 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/imageviewer/bmp/bmp.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/imageviewer/bmp/bmp.c b/apps/plugins/imageviewer/bmp/bmp.c index b96577dbed..e12cb831d6 100644 --- a/apps/plugins/imageviewer/bmp/bmp.c +++ b/apps/plugins/imageviewer/bmp/bmp.c @@ -27,10 +27,8 @@ #include "../imageviewer.h" -#ifdef HAVE_LCD_COLOR +#if defined(HAVE_LCD_COLOR) #define resize_bitmap smooth_resize_bitmap -#elif defined(USEGSLIB) -#define resize_bitmap grey_resize_bitmap #else #define resize_bitmap simple_resize_bitmap #endif @@ -65,38 +63,6 @@ struct bitmap bmp; /************************* Implementation ***************************/ -#ifdef USEGSLIB -/* copied & pasted from lib/pluginlib_bmp.c. */ -static void grey_resize_bitmap(struct bitmap *src, struct bitmap *dst) -{ - const int srcw = src->width; - const int srch = src->height; - const int dstw = dst->width; - const int dsth = dst->height; - unsigned char *srcd = src->data; - unsigned char *dstd = dst->data; - - const long xrstep = ((srcw-1) << 8) / (dstw-1); - const long yrstep = ((srch-1) << 8) / (dsth-1); - unsigned char *src_row, *dst_row; - long xr, yr = 0; - int src_x, src_y, dst_x, dst_y; - for (dst_y=0; dst_y < dsth; dst_y++) - { - src_y = (yr >> 8); - src_row = &srcd[src_y * srcw]; - dst_row = &dstd[dst_y * dstw]; - for (xr=0,dst_x=0; dst_x < dstw; dst_x++) - { - src_x = (xr >> 8); - dst_row[dst_x] = src_row[src_x]; - xr += xrstep; - } - yr += yrstep; - } -} -#endif /* USEGSLIB */ - bool img_ext(const char *ext) { if (!ext) -- cgit v1.2.3