From fefb04429317d2fbf14395b323cfcfbfcc7be088 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 8 Apr 2011 03:56:15 +0000 Subject: [PATCH] for thumbnail generation only scale the byte buffer. (was scaling float & byte). --- source/blender/imbuf/intern/thumbs.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 20276aede5c..1f2eebbedc0 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -335,6 +335,15 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im ex = (short)scaledx; ey = (short)scaledy; + /* save some time by only scaling byte buf */ + if(img->rect_float) { + if(img->rect == NULL) { + IMB_rect_from_float(img); + } + + imb_freerectfloatImBuf(img); + } + IMB_scaleImBuf(img, ex, ey); } BLI_snprintf(desc, sizeof(desc), "Thumbnail for %s", uri);