aboutsummaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-03-20 08:27:01 -0700
committerDoug Zongker <dougz@google.com>2014-03-20 08:27:01 -0700
commit577a1304352c12d968c11a667f50cd45498cae17 (patch)
tree4efd22caccd76cf24d16ec3090c5d8729c425797 /minui
parent708aa23801b0bc8349ab017c92c0deaf9d767c52 (diff)
downloadbootable_recovery-577a1304352c12d968c11a667f50cd45498cae17.zip
bootable_recovery-577a1304352c12d968c11a667f50cd45498cae17.tar.gz
bootable_recovery-577a1304352c12d968c11a667f50cd45498cae17.tar.bz2
restore minui support for paletted images with < 8 bits
The PNG image loaders should support images that use palettes requiring fewer than 8 bits. Change-Id: Ibcb0ff6f04aea8de54b03c0efa7a79e9b3635146
Diffstat (limited to 'minui')
-rw-r--r--minui/resources.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/minui/resources.c b/minui/resources.c
index a0c621b..2bae4de 100644
--- a/minui/resources.c
+++ b/minui/resources.c
@@ -101,7 +101,7 @@ static int open_png(const char* name, png_structp* png_ptr, png_infop* info_ptr,
} else if (bit_depth <= 8 && *channels == 1 && color_type == PNG_COLOR_TYPE_GRAY) {
// 1-, 2-, 4-, or 8-bit gray images: expand to 8-bit gray.
png_set_expand_gray_1_2_4_to_8(*png_ptr);
- } else if (bit_depth == 8 && *channels == 1 && color_type == PNG_COLOR_TYPE_PALETTE) {
+ } else if (bit_depth <= 8 && *channels == 1 && color_type == PNG_COLOR_TYPE_PALETTE) {
// paletted images: expand to 8-bit RGB. Note that we DON'T
// currently expand the tRNS chunk (if any) to an alpha
// channel, because minui doesn't support alpha channels in