diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:54:58 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:54:58 +0200 |
commit | bb807ea0fd605c486bb7ec928ad8edc819ec9c2b (patch) | |
tree | 16fdbd4d91a290d43444dd812720c42948b27754 /wx+/image_resources.cpp | |
parent | 6.14 (diff) | |
download | FreeFileSync-bb807ea0fd605c486bb7ec928ad8edc819ec9c2b.tar.gz FreeFileSync-bb807ea0fd605c486bb7ec928ad8edc819ec9c2b.tar.bz2 FreeFileSync-bb807ea0fd605c486bb7ec928ad8edc819ec9c2b.zip |
6.15
Diffstat (limited to 'wx+/image_resources.cpp')
-rw-r--r-- | wx+/image_resources.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index a76a2822..089acf4e 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -12,6 +12,7 @@ #include <wx/image.h> #include <wx/mstream.h> #include <zen/utf.h> +#include "image_tools.h" using namespace zen; @@ -48,7 +49,7 @@ public: void init(const Zstring& filepath); - const wxBitmap& getImage(const wxString& name) const; + const wxBitmap& getImage (const wxString& name) const; const wxAnimation& getAnimation(const wxString& name) const; private: @@ -84,7 +85,15 @@ void GlobalResources::init(const Zstring& filepath) //generic image loading if (endsWith(name, L".png")) - bitmaps.emplace(name, wxImage(streamIn, wxBITMAP_TYPE_PNG)); + { + wxImage img(streamIn, wxBITMAP_TYPE_PNG); + + //end this alpha/no-alpha/mask/wxDC::DrawBitmap/RTL/high-contrast-scheme interoperability nightmare here and now!!!! + //=> there's only one type of png image: with alpha channel, no mask!!! + convertToVanillaImage(img); + + bitmaps.emplace(name, img); + } else if (endsWith(name, L".gif")) loadAnimFromZip(streamIn, anims[name]); } |