From 26c2179be7676df3049035e5e65039c7fc232cb7 Mon Sep 17 00:00:00 2001 From: Bert Date: Wed, 16 Feb 2011 21:40:20 +0100 Subject: Refactored thumbs, new files thumbs.[ch] --- image.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index d299013..64225b1 100644 --- a/image.c +++ b/image.c @@ -110,32 +110,6 @@ int img_load(img_t *img, const char *filename) { return 1; } -int img_load_thumb(thumb_t *tn, const char *filename) { - int w, h; - float z, zw, zh; - - if (!tn) - return 0; - - if (!_imlib_load_image(filename)) - return 0; - - w = imlib_image_get_width(); - h = imlib_image_get_height(); - zw = (float) THUMB_SIZE / (float) w; - zh = (float) THUMB_SIZE / (float) h; - z = MIN(zw, zh); - tn->w = z * w; - tn->h = z * h; - - imlib_context_set_drawable(tn->pm); - imlib_render_image_part_on_drawable_at_size(0, 0, w, h, - 0, 0, tn->w, tn->h); - imlib_free_image(); - - return 1; -} - void img_check_pan(img_t *img, win_t *win) { if (!img || !win) return; -- cgit v1.2.3-54-g00ecf