summaryrefslogtreecommitdiff
path: root/wx+/image_tools.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-03-13 10:36:44 +0000
committerB Stack <bgstack15@gmail.com>2019-03-13 10:36:44 +0000
commit2c01454a3fea1c29df0aeb208862243cb928b74c (patch)
treedc226d83311470a23cdf0c02064feb525fcc5096 /wx+/image_tools.h
parentMerge branch '10.9' into 'master' (diff)
parent10.10 (diff)
downloadFreeFileSync-2c01454a3fea1c29df0aeb208862243cb928b74c.tar.gz
FreeFileSync-2c01454a3fea1c29df0aeb208862243cb928b74c.tar.bz2
FreeFileSync-2c01454a3fea1c29df0aeb208862243cb928b74c.zip
Merge branch '10.10' into 'master'10.10
10.10 Latest changes: * New option: synchronize selection * Dynamically disable unsuitable context menu options * Support MTP devices without move command * Fall back to copy/delete when implicitly moving to different device (e.g. symlink) * Fixed incorrect statistics after parallel move * Fixed menu button not triggering context menu * Fixed crash on focus change while message popup is dismissed * Fixed crash when trying to shrink empty image * Fixed invisible dialogs when monitor is turned off in multi-monitor setup * Work around GetFileInformationByHandle error code 58 on WD My Cloud EX * Changing deletion handling now correctly triggers updated config * Support root-relative FTP file paths (e.g. FreeNAS) * Move and rename MTP items as a transaction * Exclude AppleDouble files (._) via default filter on macOS * Support home path for FTP folder picker * Use server default permissions when creating SFTP folder * Use native OpenSSL AES-CTR rather than libssh2 fallback * Added context information for cloud connection errors * Updated translation files See merge request opensource-tracking/FreeFileSync!7
Diffstat (limited to 'wx+/image_tools.h')
-rw-r--r--wx+/image_tools.h4
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!
}
bgstack15