diff --git a/kimgio/ico.cpp b/kimgio/ico.cpp index 20e400ef..d72f184a 100644 --- a/kimgio/ico.cpp +++ b/kimgio/ico.cpp @@ -366,6 +366,7 @@ bool ICOHandler::write(const QImage &image) datastream.writeRawData(bmpimagebits, bmpimagesize); #endif + // NOTE: the mask is undocumented but some browsers fail to load images without mask const QImage bmpimagemask = bmpimage.createAlphaMask(); const char* bmpimagemaskbits = reinterpret_cast(bmpimagemask.constBits()); const int bmpimagemasksize = bmpimagemask.byteCount();