evas/png - better way to support png grayscale with transparency format.

suggested by cedric.
This commit is contained in:
ChunEon Park 2014-06-26 17:00:37 +09:00
parent edb1202a84
commit 5ade5ca433
2 changed files with 1 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;