diff options
Diffstat (limited to 'source/blender/blendthumb/src/blendthumb_win32.cc')
-rw-r--r-- | source/blender/blendthumb/src/blendthumb_win32.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blendthumb/src/blendthumb_win32.cc b/source/blender/blendthumb/src/blendthumb_win32.cc index 287710934e2..2acc8f20a12 100644 --- a/source/blender/blendthumb/src/blendthumb_win32.cc +++ b/source/blender/blendthumb/src/blendthumb_win32.cc @@ -171,8 +171,8 @@ IFACEMETHODIMP CBlendThumb::GetThumbnail(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE } *pdwAlpha = WTSAT_ARGB; - /* Scale down the thumbnail if required. */ - if ((unsigned)thumb.width > cx || (unsigned)thumb.height > cx) { + /* Scale up the thumbnail if required. */ + if ((unsigned)thumb.width < cx && (unsigned)thumb.height < cx) { float scale = 1.0f / (std::max(thumb.width, thumb.height) / (float)cx); LONG NewWidth = (LONG)(thumb.width * scale); LONG NewHeight = (LONG)(thumb.height * scale); |