Bug 683610 Restore support for 1bpp RLE bitmaps r=joedrew\!
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Wed, 31 Aug 2011 20:11:04 +0100
changeset 77628 84233d215c4e8d2f2f71e3d36cb912f88d3c1498
parent 77627 4090b403394a9bdae934a64a78b3fb132fd5ccc9
child 77629 d9b9693feb4671d8c393ec6f52a4f69a35a11bf8
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew
bugs683610
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 683610 Restore support for 1bpp RLE bitmaps r=joedrew\!
modules/libpr0n/decoders/nsBMPDecoder.cpp
--- a/modules/libpr0n/decoders/nsBMPDecoder.cpp
+++ b/modules/libpr0n/decoders/nsBMPDecoder.cpp
@@ -309,17 +309,17 @@ nsBMPDecoder::WriteInternal(const char* 
         // If we have RLE4 or RLE8 or BI_ALPHABITFIELDS, then ensure we
         // have valid BPP values before adding the frame
         if (mBIH.compression == BI_RLE8 && mBIH.bpp != 8) {
           PR_LOG(gBMPLog, PR_LOG_DEBUG, 
                  ("BMP RLE8 compression only supports 8 bits per pixel\n"));
           PostDataError();
           return;
         }
-        if (mBIH.compression == BI_RLE4 && mBIH.bpp != 4) {
+        if (mBIH.compression == BI_RLE4 && mBIH.bpp != 4 && mBIH.bpp != 1) {
           PR_LOG(gBMPLog, PR_LOG_DEBUG, 
                  ("BMP RLE4 compression only supports 4 bits per pixel\n"));
           PostDataError();
           return;
         }
         if (mBIH.compression == BI_ALPHABITFIELDS && 
             mBIH.bpp != 16 && mBIH.bpp != 32) {
           PR_LOG(gBMPLog, PR_LOG_DEBUG,