mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
for thumbnail generation only scale the byte buffer. (was scaling float & byte).
This commit is contained in:
parent
b305a26d2f
commit
fefb044293
1 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue