Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/loaders/eet Modified Files: evas_image_load_eet.c Log Message: check sparseness when doing eet loads. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/eet/evas_image_load_eet.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- evas_image_load_eet.c 2 Oct 2006 11:12:39 -0000 1.5 +++ evas_image_load_eet.c 2 Oct 2006 11:24:26 -0000 1.6 @@ -48,7 +48,6 @@ im->image->w = w; im->image->h = h; eet_close(ef); - evas_common_image_set_alpha_sparse(im); return 1; } @@ -59,6 +58,7 @@ int alpha, compression, quality, lossy; Eet_File *ef; DATA32 *body, *p, *end; + DATA32 nas = 0; if ((!file) || (!key)) return 0; if ((im->image) && (im->image->data)) return 1; @@ -101,11 +101,14 @@ r = R_VAL(p); g = G_VAL(p); b = B_VAL(p); + if ((a == 0) || (a == 255)) nas++; if (r > a) r = a; if (g > a) g = a; if (b > a) b = a; *p = ARGB_JOIN(a, r, g, b); } + if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (im->image->w * im->image->h)) + im->flags |= RGBA_IMAGE_ALPHA_SPARSE; } // result is already premultiplied now if u compile with edje // evas_common_image_premul(im); ------------------------------------------------------------------------- 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