diff options
author | ChunEon Park <hermet@hermet.pe.kr> | 2014-06-26 17:00:37 +0900 |
---|---|---|
committer | ChunEon Park <hermet@hermet.pe.kr> | 2014-06-26 17:00:37 +0900 |
commit | 5ade5ca4332aa51fdc1e179d3a5c24fe2574f76e (patch) | |
tree | ee092ccb905eefb5968e4d927456cc440d73b64d | |
parent | edb1202a84f4b413f02ecfa950e08c66fcf2ed26 (diff) | |
download | efl-5ade5ca4332aa51fdc1e179d3a5c24fe2574f76e.tar.gz |
evas/png - better way to support png grayscale with transparency format.
suggested by cedric.
-rw-r--r-- | src/modules/evas/engines/gl_common/evas_gl_image.c | 6 | ||||
-rw-r--r-- | src/modules/evas/loaders/png/evas_image_load_png.c | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index 7de58157ab..13b7598979 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -222,12 +222,6 @@ _evas_gl_common_image(Evas_Engine_GL_Context *gc, RGBA_Image *im_im, Evas_Image_ if (cspace == EVAS_COLORSPACE_ETC1 && gc->shared->info.etc2) cspace = EVAS_COLORSPACE_RGB8_ETC2; - /* Current GL doesn't support grayscale with transparency - let it convert to argb8888 in loader */ - if ((cspace == EVAS_COLORSPACE_GRY8) && - im_im->cache_entry.flags.alpha) - cspace = EVAS_COLORSPACE_ARGB8888; - im_im->cache_entry.space = cspace; } diff --git a/src/modules/evas/loaders/png/evas_image_load_png.c b/src/modules/evas/loaders/png/evas_image_load_png.c index f155d8ba23..a8e9aa3288 100644 --- a/src/modules/evas/loaders/png/evas_image_load_png.c +++ b/src/modules/evas/loaders/png/evas_image_load_png.c @@ -182,7 +182,7 @@ evas_image_load_file_head_png(void *loader_data, prop->cspaces = cspace_grey_alpha; break; case PNG_COLOR_TYPE_GRAY: - prop->cspaces = cspace_grey; + if (!hasa) prop->cspaces = cspace_grey; break; } if (hasa) prop->alpha = 1; |