diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-08 07:56:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-08 07:56:15 +0400 |
commit | fefb04429317d2fbf14395b323cfcfbfcc7be088 (patch) | |
tree | a8147bc266442d51a0ac16f5e0c3c1effe62d88b /source | |
parent | b305a26d2f15e047347af7502dca6e17c3292538 (diff) |
for thumbnail generation only scale the byte buffer. (was scaling float & byte).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 9 |
1 files changed, 9 insertions, 0 deletions
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); |