From ff27b68f41ce511e162d6e561103c522d9507a5f Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 23 Sep 2022 14:49:36 -0700 Subject: Fix T101295: Allow Large Windows Thumbnails Allow our Windows Thumbnail Handler to supply thumbnails up to the maximum 256x256 size. Differential Revision: https://developer.blender.org/D16051 Reviewed by Ray Molenkamp --- source/blender/blendthumb/src/blendthumb_win32.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blendthumb/src') 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); -- cgit v1.2.3