1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Akio Idehara
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
28 /****************************************************************
31 * resize bitmap on load with scaling
33 * If HAVE_LCD_COLOR then this func use smooth scaling algorithm
34 * - downscaling both way use "Area Sampling"
35 * if IMG_RESIZE_BILINER or IMG_RESIZE_NEAREST is NOT set
36 * - otherwise "Bilinear" or "Nearest Neighbour"
38 * If !(HAVE_LCD_COLOR) then use simple scaling algorithm "Nearest Neighbour"
41 ****************************************************************/
43 /* nothing needs the on-stack buffer right now */
44 #define MAX_SC_STACK_ALLOC 0
45 #define HAVE_UPSCALER 1
49 #if !defined(HAVE_LCD_COLOR) && \
50 (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1))
53 struct uint8_rgb
* buf
;
58 /* intermediate type used by the scaler for color output. greyscale version
68 int recalc_dimension(struct dim
*dst
, struct dim
*src
);
70 int resize_on_load(struct bitmap
*bm
, bool dither
,
71 struct dim
*src
, struct rowset
*tmp_row
,
72 unsigned char *buf
, unsigned int len
,
73 struct img_part
* (*store_part
)(void *args
),
75 #endif /* _RESIZE_H_ */