On Wed, 28 Jul 2010 11:49:06 +0800 Brian Wang <brian.wang.0...@gmail.com> said:
> On Wed, Jul 28, 2010 at 7:55 AM, Carsten Haitzler <ras...@rasterman.com> > wrote: > > On Wed, 14 Jul 2010 18:22:24 +0800 Brian Wang <brian.wang.0...@gmail.com> > > said: > > > > unfortunately this breaks loading of images from a bmp test suite i have. > > (as such evas's loader loads more files correctly than gqview can). images > > that break are attached. > > I have tested the broken image. I guess you mean they're "invisible" > with my patch? > GIMP can load them correctly. I briefly browsed GIMP's bmp plug-in > code but could not find how it determines the correct alpha mask for > 32-bit BMP. I could not find relevant specification about ARGB 32-bit > BMP in BMP v3 specification. Without proper reference, I can only > come up with a workaround... Any BMP wizards here? > > However, I think the attached patch does the trick. It first sets > hasa flag and if all pixels are transparent (I guess it's an > uninteresting/useless image if the user can't see any pixel of it), it > set the Image_Entry's alpha flag to zero. > > g32def.bmp, g32bf.bmp and the attached Icon.bmp can all be loaded > properly. Any more interesting BMPs? :-) > > Thanks for looking into this. well i wrote the bmp loader based off specifications (and reading the old bmp loader in imlib2)... i literally spent a while reading them... so... you'll have to figure out what i got wrong in handling the spec... or... what is missing from the spec that gimp uses :) but your modified patch smells of being pretty hacky to me as a fully alpha image is valid - how many blank/transparent gifs are there around the internet for doing filling/spacing? :) > brian > > > > >> Hello all, > >> > >> GIMP (2.6.8) seems to save 32-bit BMP in the "Windows 3.0 + (v3)" > >> format mentioned in evas_image_load_bmp.c. > >> I'm not sure if the patch breaks anything (or images created by other > >> tools). Please correct it if you see fit. > >> This patch should enable support for ARGB BMP files for evas. It's > >> tested on my x86 box. > >> > >> Cheers, > >> > >> > >> brian > >> > >> -- > >> brian > >> ------------------ > >> > >> Cool-Karaoke - The smallest recording studio, in your palm, open-sourced > >> http://cool-idea.com.tw/ > >> > >> iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe > > > > > > -- > > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > > The Rasterman (Carsten Haitzler) ras...@rasterman.com > > > > > > > > -- > brian > ------------------ > > Cool-Karaoke - The smallest recording studio, in your palm, open-sourced > http://cool-idea.com.tw/ > > iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel