summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/FreeImage/PluginICO.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-13 20:28:24 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-13 20:28:24 +0000
commitd2d798d0f11abcbf141db69869e76e8d123ec1eb (patch)
treecee8645964030b4b80231952885911f724850d12 /plugins/AdvaImg/src/FreeImage/PluginICO.cpp
parenta400ebf572dcad9b43d1b641b1742814f8b5e8a5 (diff)
FreeImage updated to 3.16
git-svn-id: http://svn.miranda-ng.org/main/trunk@11379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AdvaImg/src/FreeImage/PluginICO.cpp')
-rw-r--r--plugins/AdvaImg/src/FreeImage/PluginICO.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/AdvaImg/src/FreeImage/PluginICO.cpp b/plugins/AdvaImg/src/FreeImage/PluginICO.cpp
index 7f41a0d841..df5ecee91d 100644
--- a/plugins/AdvaImg/src/FreeImage/PluginICO.cpp
+++ b/plugins/AdvaImg/src/FreeImage/PluginICO.cpp
@@ -339,7 +339,8 @@ LoadStandardIcon(FreeImageIO *io, fi_handle handle, int flags, BOOL header_only)
// bitmap has been loaded successfully!
// convert to 32bpp and generate an alpha channel
- if((flags & ICO_MAKEALPHA) == ICO_MAKEALPHA) {
+ // apply the AND mask only if the image is not 32 bpp
+ if(((flags & ICO_MAKEALPHA) == ICO_MAKEALPHA) && (bit_count < 32)) {
FIBITMAP *dib32 = FreeImage_ConvertTo32Bits(dib);
FreeImage_Unload(dib);