diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-05-28 13:19:01 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-05-28 13:19:01 (GMT) |
| commit | 380a45a4c9ad1f38f5cbee2d75e813fd0911cfcc (patch) | |
| tree | 9ad962c94b4b3e3cb9bf724b8ce25f21c626b9a9 /src/interface.c | |
| parent | abb0ceb98134903e9c339c0ba2546c82eaadfc3c (diff) | |
| download | powder-380a45a4c9ad1f38f5cbee2d75e813fd0911cfcc.zip powder-380a45a4c9ad1f38f5cbee2d75e813fd0911cfcc.tar.gz | |
Image resampling for thumbnails
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interface.c b/src/interface.c index 93af41f..eab39b4 100644 --- a/src/interface.c +++ b/src/interface.c @@ -2493,10 +2493,13 @@ int search_ui(pixel *vid_buf) { //render_thumb(search_thumbs[pos], search_thsizes[pos], 1, v_buf, gx, gy, GRID_S); int finh, finw; - char *thumb_imgdata = ptif_unpack(search_thumbs[pos], search_thsizes[pos], &finw, &finh); + pixel *thumb_rsdata = NULL; + pixel *thumb_imgdata = ptif_unpack(search_thumbs[pos], search_thsizes[pos], &finw, &finh); if(thumb_imgdata!=NULL){ - draw_image(v_buf, thumb_imgdata, gx, gy, finw, finh, 255); + thumb_rsdata = resample_img(thumb_imgdata, finw, finh, XRES/GRID_S, YRES/GRID_S); + draw_image(v_buf, thumb_rsdata, gx, gy, XRES/GRID_S, YRES/GRID_S, 255); free(thumb_imgdata); + free(thumb_rsdata); } thumb_drawn[pos] = 1; } |
