src/plugins/imageformats/ico/qicohandler.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
child 8 3f74d0d4af4c
--- a/src/plugins/imageformats/ico/qicohandler.cpp	Fri Feb 19 23:40:16 2010 +0200
+++ b/src/plugins/imageformats/ico/qicohandler.cpp	Fri Mar 12 15:46:37 2010 +0200
@@ -556,7 +556,11 @@
                 else                    // # colors used
                     icoAttrib.ncolors = header.biClrUsed ? header.biClrUsed : 1 << icoAttrib.nbits;
                 icoAttrib.w = iconEntry.bWidth;
+                if (icoAttrib.w == 0)
+                    icoAttrib.w = header.biWidth;
                 icoAttrib.h = iconEntry.bHeight;
+                if (icoAttrib.h == 0)
+                    icoAttrib.h = header.biHeight/2;
 
                 QImage::Format format = QImage::Format_ARGB32;
                 if (icoAttrib.nbits == 24)