forget it vincent
On Thu, 10 Mar 2011, Vincent Torri wrote: > > no changelog ? > > Vincent > > On Thu, 10 Mar 2011, Enlightenment SVN wrote: > >> Log: >> ok - finally - biran wang... you get your hacky bmp loader. >> >> >> >> Author: raster >> Date: 2011-03-10 04:11:42 -0800 (Thu, 10 Mar 2011) >> New Revision: 57668 >> Trac: http://trac.enlightenment.org/e/changeset/57668 >> >> Modified: >> trunk/evas/src/modules/loaders/bmp/evas_image_load_bmp.c >> >> Modified: trunk/evas/src/modules/loaders/bmp/evas_image_load_bmp.c >> =================================================================== >> --- trunk/evas/src/modules/loaders/bmp/evas_image_load_bmp.c 2011-03-10 >> 12:04:00 UTC (rev 57667) >> +++ trunk/evas/src/modules/loaders/bmp/evas_image_load_bmp.c 2011-03-10 >> 12:11:42 UTC (rev 57668) >> @@ -161,6 +161,7 @@ >> if (!read_int(f, &tmp2)) goto close_file; >> important_colors = tmp2; // number of important colors - 0 if all >> if (image_size == 0) image_size = fsize - offset; >> + if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to >> store it this way >> } >> else if (head_size == 108) // Windows 95/NT4 + (v4) >> { >> @@ -435,6 +436,7 @@ >> if (!read_int(f, &tmp2)) goto close_file; >> important_colors = tmp2; // number of important colors - 0 if all >> if (image_size == 0) image_size = fsize - offset; >> + if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to >> store it this way >> } >> else if (head_size == 108) // Windows 95/NT4 + (v4) >> { >> @@ -949,6 +951,7 @@ >> } >> else if (bit_count == 32) >> { >> + int none_zero_alpha = 0; >> pix = surface; >> for (y = 0; y < h; y++) >> { >> @@ -959,6 +962,7 @@ >> g = p[1]; >> r = p[2]; >> a = p[3]; >> + if (a) none_zero_alpha = 1; >> if (!hasa) a = 0xff; >> *pix = ARGB_JOIN(a, r, g, b); >> p += 4; >> @@ -969,6 +973,17 @@ >> if (fix > 0) p += 4 - fix; // align row read >> if (p >= buffer_end) break; >> } >> + if (!none_zero_alpha) >> + { >> + ie->flags.alpha = 0; >> + if (hasa) >> + { >> + unsigned int *pixend = pix + (w * h); >> + >> + for (pix = surface; pix < pixend; pix++) >> + A_VAL(pix) = 0xff; >> + } >> + } >> } >> else >> goto close_file; >> >> >> ------------------------------------------------------------------------------ >> Colocation vs. Managed Hosting >> A question and answer guide to determining the best fit >> for your organization - today and in the future. >> http://p.sf.net/sfu/internap-sfd2d >> _______________________________________________ >> enlightenment-svn mailing list >> enlightenment-...@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >> >> > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel