This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8308 - Port of a imlib2 based smooth scaling algorithm for bitmaps.
Attached to Project:
Rockbox
Opened by Jonas Hurrelmann (jott) - Wednesday, 12 December 2007, 11:37 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Monday, 07 April 2008, 00:31 GMT+2
Opened by Jonas Hurrelmann (jott) - Wednesday, 12 December 2007, 11:37 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Monday, 07 April 2008, 00:31 GMT+2
|
DetailsThis patch will add support for smooth scaling of bitmaps based on a imlib2
algorithm. The main code is placed under bmp_smooth_scale.c and made visible via bmp.h. It is a drop-in replacement for the just introduced "simple_resize_bitmap": int smooth_resize_bitmap(struct bitmap *src, struct bitmap *dst); The algorithm performs a bilinear scaling with different code-pathes, depending on scaling directions (up or down) as well as scaling down only horizontally or vertically. Currently the maximum source size is LCD_WIDTHxLCD_HEIGHT, due to static allocation of some lookup tables. The patch also renames the plugin based test case from resize_test.c to test_resize.c, to make it consistent with the other tests and adds it to the apps CATEGORIES (you still have to add it to SOURCES). The test expects a bitmap "/test.bmp" for now (which can be up to 200x200px). |
This task depends upon
Closed by Nicolas Pennequin (nicolas_p)
Monday, 07 April 2008, 00:31 GMT+2
Reason for closing: Accepted
Monday, 07 April 2008, 00:31 GMT+2
Reason for closing: Accepted
bmp file, so it can be used dynamically (e.g. image viewer).
It also gives a much higher quality due to the bilinear interpolation.
But it is clearly related to the bmp_resize patch and open for further
discussion.
As for "just introduced simple_resize_bitmap" see r15913, the nearest
neighbour algorithm is in SVN now.
and hence there is no need for static allocations.