summaryrefslogtreecommitdiff
path: root/wx+/image_tools.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:35 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:35 +0200
commit460091fb0b2ff114cc741372f15bb43b702ea3b1 (patch)
tree0562c2eda4c66969c6e6d0910080db9f5b0def3e /wx+/image_tools.h
parent5.15 (diff)
downloadFreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.gz
FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.bz2
FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.zip
5.16
Diffstat (limited to 'wx+/image_tools.h')
-rw-r--r--wx+/image_tools.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/wx+/image_tools.h b/wx+/image_tools.h
index 9de93c26..ec9e34d4 100644
--- a/wx+/image_tools.h
+++ b/wx+/image_tools.h
@@ -54,6 +54,8 @@ void move(wxImage& img, int up, int left)
inline
wxBitmap greyScale(const wxBitmap& bmp)
{
+ assert(!bmp.GetMask()); //wxWidgets screws up for the gazillionth time applying a mask instead of alpha channel if the .png image has only 0 and 0xff opacity values!!!
+
wxImage output = bmp.ConvertToImage().ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3); //treat all channels equally!
//wxImage output = bmp.ConvertToImage().ConvertToGreyscale();
adjustBrightness(output, 160);
bgstack15