Skip to content

Commit 3e7da43

Browse files
committed
Limit zoom factor to 5 on shell previews
1 parent 913824c commit 3e7da43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

SarThumbnailHandler/ThumbnailProvider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ IFACEMETHODIMP ThumbnailProvider::GetThumbnail(UINT thumb_size, HBITMAP* phbmp,
8181
}
8282

8383
int maxDim = __max(sar->width(), sar->height());
84+
thumb_size = __min(5 * maxDim, thumb_size);
85+
8486
int newW = sar->width() * thumb_size / maxDim;
8587
int newH = sar->height() * thumb_size / maxDim;
8688

0 commit comments

Comments
 (0)