eunue pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b9965ffd8f36671a4ba839411b72d00f402749ba

commit b9965ffd8f36671a4ba839411b72d00f402749ba
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Tue Nov 29 23:27:18 2016 +0900

    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
---
 src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 93f4d59..fa3ba4b 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)

-- 


Reply via email to