diff options
author | Tom Wai-Hong Tam <waihong@google.com> | 2011-02-14 16:08:49 +0800 |
---|---|---|
committer | Tom Wai-Hong Tam <waihong@google.com> | 2011-02-14 16:08:49 +0800 |
commit | a985ed405e7b7640fbc9499d676670b8cd366a7a (patch) | |
tree | 02460397328032f1bbb75b4872ed7392a93eb724 | |
parent | e1649e136c55300962079b72035498bbdd1c1a52 (diff) | |
download | vboot-a985ed405e7b7640fbc9499d676670b8cd366a7a.tar.gz |
Whitelist RLE compression for ARM in bmpblk_utility
BUG=chromium-os:11017
TEST=use RLE BMP files as input to run bmpblk_utility
Change-Id: I2398d1c6cb9d5f90a85d8bfcab0af6e41a52b022
Review URL: http://codereview.chromium.org/6489026
-rw-r--r-- | utility/bmpblk_utility.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utility/bmpblk_utility.cc b/utility/bmpblk_utility.cc index f997cf5d..66b60d9d 100644 --- a/utility/bmpblk_utility.cc +++ b/utility/bmpblk_utility.cc @@ -30,7 +30,7 @@ typedef struct { uint32_t PixelHeight; uint16_t Planes; // Must be 1 for x86 uint16_t BitPerPixel; // 1, 4, 8, or 24 for x86 - uint32_t CompressionType; // must be 0 for x86 + uint32_t CompressionType; // 0 (none) for x86, 1 (RLE) for arm uint32_t ImageSize; uint32_t XPixelsPerMeter; uint32_t YPixelsPerMeter; @@ -334,7 +334,7 @@ ImageFormat BmpBlockUtil::get_image_format(const string content) { if (hdr->CharB != 'B' || hdr->CharM != 'M' || hdr->Planes != 1 || - hdr->CompressionType != 0 || + (hdr->CompressionType != 0 && hdr->CompressionType != 1) || (hdr->BitPerPixel != 1 && hdr->BitPerPixel != 4 && hdr->BitPerPixel != 8 && hdr->BitPerPixel != 24)) return FORMAT_INVALID; |