On Wed, Jul 28, 2010 at 11:54 AM, Carsten Haitzler <ras...@rasterman.com> wrote:
> 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? :)

Definitely hacky as it's a workaround instead of a proper fix. :-)
I haven't thought about using fully alpha images as spacers and yes,
it's a valid one.

I'll just keep the patch private for now since I'm working on a tight
schedule for my EFL-based device. :-)
Hopefully, I can find bits of time here and there to properly fix the issue.

A side note: I've tested your images with SDL_Image-1.2.5.  g32def.bmp
fails to show up as well.
Only GIMP properly shows both of your images and Icon.bmp.

Cheers,


brian


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



-- 
brian
------------------

Cool-Karaoke - The smallest recording studio, in your palm, open-sourced
http://cool-idea.com.tw/

iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe

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

Reply via email to