Mercurial > geeqie.yaz
diff src/thumb_standard.c @ 14:25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
##### an offical release when making enhancements and translation updates. #####
Thu Mar 3 01:16:23 2005 John Ellis <johne@verizon.net>
* pan-view.c: Add 'dots' image size option, fix up border size at edge
of grid, and make drag and drop work to/from the window.
Wed Mar 2 23:34:30 2005 John Ellis <johne@verizon.net>
* globals.c, gqview.h, rcfile.c: Add thumbnail_fast option variable.
* image-load.c, typedefs.h: Add shrunk flag to determine if an image
was scaled down using image_loader_set_requested_size.
* image.c: Make panning with mouse scroll more when holding shift key.
* preferences.c: Add option for 'Fast jpeg thumbnailing' and disabled
xvpics option in the gui - now a hidden option.
* thumb.c, thumb_standard.c: Add support for thumbnail_fast option..
author | gqview |
---|---|
date | Thu, 03 Mar 2005 06:32:53 +0000 |
parents | d907d608745f |
children | dcc04a6a58bf |
line wrap: on
line diff
--- a/src/thumb_standard.c Wed Mar 02 02:47:53 2005 +0000 +++ b/src/thumb_standard.c Thu Mar 03 06:32:53 2005 +0000 @@ -442,7 +442,7 @@ return (*new_w != old_w || *new_h != old_h); } -static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf) +static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf, gint shrunk) { GdkPixbuf *pixbuf_thumb = NULL; GdkPixbuf *result; @@ -452,7 +452,7 @@ sh = gdk_pixbuf_get_height(pixbuf); if (tl->cache_enable && !tl->cache_hit && - (sw >= THUMB_SIZE_NORMAL || sh >= THUMB_SIZE_NORMAL)) + (sw >= THUMB_SIZE_NORMAL || sh >= THUMB_SIZE_NORMAL || shrunk)) { gint cache_w, cache_h; gint thumb_w, thumb_h; @@ -595,7 +595,7 @@ tl->cache_hit = (tl->thumb_path != NULL); - tl->pixbuf = thumb_loader_std_finish(tl, pixbuf); + tl->pixbuf = thumb_loader_std_finish(tl, pixbuf, il->shrunk); if (tl->func_done) tl->func_done(tl, tl->data); } @@ -635,18 +635,19 @@ { tl->il = image_loader_new(path); -#if 0 - /* this will speed up jpegs by up to 3x in some cases */ - if (tl->requested_width <= THUMB_SIZE_NORMAL && - tl->requested_height <= THUMB_SIZE_NORMAL) + if (thumbnail_fast) { - image_loader_set_requested_size(tl->il, THUMB_SIZE_NORMAL, THUMB_SIZE_NORMAL); + /* this will speed up jpegs by up to 3x in some cases */ + if (tl->requested_width <= THUMB_SIZE_NORMAL && + tl->requested_height <= THUMB_SIZE_NORMAL) + { + image_loader_set_requested_size(tl->il, THUMB_SIZE_NORMAL, THUMB_SIZE_NORMAL); + } + else + { + image_loader_set_requested_size(tl->il, THUMB_SIZE_LARGE, THUMB_SIZE_LARGE); + } } - else - { - image_loader_set_requested_size(tl->il, THUMB_SIZE_LARGE, THUMB_SIZE_LARGE); - } -#endif image_loader_set_error_func(tl->il, thumb_loader_std_error_cb, tl); if (tl->func_progress)