Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-08 07:56:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-08 07:56:15 +0400
commitfefb04429317d2fbf14395b323cfcfbfcc7be088 (patch)
treea8147bc266442d51a0ac16f5e0c3c1effe62d88b /source/blender/imbuf/intern
parentb305a26d2f15e047347af7502dca6e17c3292538 (diff)
for thumbnail generation only scale the byte buffer. (was scaling float & byte).
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/thumbs.c9
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);