diff options
author | B Stack <bgstack15@gmail.com> | 2019-03-12 16:09:20 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-03-12 16:09:20 -0400 |
commit | 27177c9cbc47d4114ccee56015fb0407e7e258cc (patch) | |
tree | dc226d83311470a23cdf0c02064feb525fcc5096 /wx+/image_tools.h | |
parent | Merge branch '10.9' into 'master' (diff) | |
download | FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.tar.gz FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.tar.bz2 FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.zip |
10.10
Diffstat (limited to 'wx+/image_tools.h')
-rw-r--r-- | wx+/image_tools.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wx+/image_tools.h b/wx+/image_tools.h index e1a6953c..b1df41e6 100644 --- a/wx+/image_tools.h +++ b/wx+/image_tools.h @@ -187,6 +187,10 @@ wxImage shrinkImage(const wxImage& img, int requestedSize) { const int maxExtent = std::max(img.GetWidth(), img.GetHeight()); assert(requestedSize <= maxExtent); + + if (requestedSize >= maxExtent) + return img; + return img.Scale(img.GetWidth () * requestedSize / maxExtent, img.GetHeight() * requestedSize / maxExtent, wxIMAGE_QUALITY_BILINEAR); //looks sharper than wxIMAGE_QUALITY_HIGH! } |