Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/savers/eet Modified Files: evas_image_save_eet.c Log Message: more commit.... =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/savers/eet/evas_image_save_eet.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evas_image_save_eet.c 6 Sep 2006 07:28:46 -0000 1.3 +++ evas_image_save_eet.c 30 Sep 2006 10:21:23 -0000 1.4 @@ -16,6 +16,7 @@ { Eet_File *ef; int alpha = 0, lossy = 0, ok = 0; + DATA32 *data; if (!im || !im->image || !im->image->data || !file) return 0; @@ -25,9 +26,24 @@ if (!ef) return 0; if ((quality <= 100) || (compress < 0)) lossy = 1; if (im->flags & RGBA_IMAGE_HAS_ALPHA) alpha = 1; - ok = eet_data_image_write(ef, (char *)key, im->image->data, + if (alpha) + { + data = malloc(im->image->w * im->image->h * sizeof(DATA32)); + if (!data) + { + eet_close(ef); + return 0; + } + memcpy(data, im->image->data, im->image->w * im->image->h * sizeof(DATA32)); + evas_common_convert_argb_unpremul(data, im->image->w * im->image->h); + } + else + data = im->image->data; + ok = eet_data_image_write(ef, (char *)key, data, im->image->w, im->image->h, alpha, compress, quality, lossy); + if (alpha) + free(data); eet_close(ef); return ok; } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs