summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2016-11-29 23:27:18 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2016-11-30 11:33:33 +0900
commitb9965ffd8f36671a4ba839411b72d00f402749ba (patch)
tree7fb6477897e33f78065f396e124e4ce65886c0f4
parent3277ffa712fce9afa6a2fe70de9ac4099a643079 (diff)
downloadefl-b9965ffd8f36671a4ba839411b72d00f402749ba.tar.gz
evas: bug fix in bmp loader
when the DIB header is BITMAPINFOHEADER (size 40), a bitmap file has alpha channel only if the compression method is BI_ALPHABITFIELDS (= 6). the original code enabled alpha channel when the compression method was BI_RGB (= 0), which made an opaque bmp image loaded as a transparent one. @fix
-rw-r--r--src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c b/src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c
index 93f4d59f20..fa3ba4b53c 100644
--- a/src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c
+++ b/src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c
@@ -205,7 +205,7 @@ _evas_image_load_file_header(void *map, size_t fsize, size_t *position, int *ima
if (!read_int(map, fsize, position, &tmp2)) return EINA_FALSE;
//important_colors = tmp2; // number of important colors - 0 if all
if (*image_size == 0) *image_size = fsize - header->offset;
- if ((header->comp == 0) && (header->bit_count == 32)) header->hasa = 1; // GIMP seems to store it this way
+ if ((header->comp == 6) && (header->bit_count == 32)) header->hasa = 1;
break;
}
case 108: // Windows 95/NT4 + (v4)