summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-09-29 20:38:14 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-09-29 20:38:14 +0000
commite9206717558ed3256e40c4b4e620156492697dc2 (patch)
tree3209b2155b4534cc85362dd7eafea60d0d50e808
parent289e862695a6194ade9f7782cab63a7cbc19c066 (diff)
imageviewer bmp - drop special case for grey bitmap scaller
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28186 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/imageviewer/bmp/bmp.c36
1 files changed, 1 insertions, 35 deletions
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)