summaryrefslogtreecommitdiff
path: root/wx+/image_tools.h
diff options
context:
space:
mode:
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