Index: Source/platform/image-decoders/bmp/BMPImageReader.cpp |
diff --git a/Source/platform/image-decoders/bmp/BMPImageReader.cpp b/Source/platform/image-decoders/bmp/BMPImageReader.cpp |
index 55e8190084b1ebdd343c30afae46f2419cfdb18c..d4bc7a6f72d46b04eb26683667e0fa2129de7e19 100644 |
--- a/Source/platform/image-decoders/bmp/BMPImageReader.cpp |
+++ b/Source/platform/image-decoders/bmp/BMPImageReader.cpp |
@@ -138,7 +138,7 @@ bool BMPImageReader::decodeBMP(bool onlySize) |
// If the image has an AND mask and there was no alpha data, process the |
// mask. |
- if (m_isInICO && !m_decodingAndMask && !m_buffer->hasAlpha()) { |
+ if (m_isInICO && !m_decodingAndMask && (!m_bitMasks[3] || !m_seenNonZeroAlphaPixel)) { |
// Reset decoding coordinates to start of image. |
m_coord.setX(0); |
m_coord.setY(m_isTopDown ? 0 : (m_parent->size().height() - 1)); |