summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/bmp_smooth_scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/bmp_smooth_scale.c')
-rw-r--r--apps/plugins/lib/bmp_smooth_scale.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/lib/bmp_smooth_scale.c b/apps/plugins/lib/bmp_smooth_scale.c
index 4d5eab00a0..e99ff33d71 100644
--- a/apps/plugins/lib/bmp_smooth_scale.c
+++ b/apps/plugins/lib/bmp_smooth_scale.c
@@ -78,10 +78,17 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
78 fb_data *sptr, *dptr; 78 fb_data *sptr, *dptr;
79 int x, y, end; 79 int x, y, end;
80 int val_y = 0, val_x; 80 int val_y = 0, val_x;
81#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
82 const int sw = src_bmp->height;
83 const int sh = src_bmp->width;
84 const int dw = dest_bmp->height;
85 const int dh = dest_bmp->width;
86#else
81 const int sw = src_bmp->width; 87 const int sw = src_bmp->width;
82 const int sh = src_bmp->height; 88 const int sh = src_bmp->height;
83 const int dw = dest_bmp->width; 89 const int dw = dest_bmp->width;
84 const int dh = dest_bmp->height; 90 const int dh = dest_bmp->height;
91#endif
85 const int inc_x = (sw << 16) / dw; 92 const int inc_x = (sw << 16) / dw;
86 const int inc_y = (sh << 16) / dh; 93 const int inc_y = (sh << 16) / dh;
87 const int Cp_x = ((dw << 14) / sw) + 1; 94 const int Cp_x = ((dw << 14) / sw) + 1;