nanogui: Patch: Images with Alpha channel, 8bpp grayscale


Previous by date: 16 Jun 2005 20:02:10 +0100 Re: valgrind, Greg Haerr
Next by date: 16 Jun 2005 20:02:10 +0100 nanowm does not raise window to top when click window body, 罗建文
Previous in thread: 16 Jun 2005 20:02:10 +0100 Patch: Images with Alpha channel, 8bpp grayscale, skoe.nexgo.de
Next in thread: 16 Jun 2005 20:02:10 +0100 Re: Patch: Images with Alpha channel, 8bpp grayscale, skoe.nexgo.de

Subject: Re: [nanogui] Patch: Images with Alpha channel, 8bpp grayscale
From: "Greg Haerr" ####@####.####
Date: 16 Jun 2005 20:02:10 +0100
Message-Id: <282901c5729f$644d4800$0300a8c0@RDP>

Thomas -
    This patch looks pretty good.  I'll have to apply it manually
since I just reworked this very section of devdraw.c fixing
the transparency problem last night.  I've got two questions
though:

Which image decoder are you using that sets MWIMAGE_ALPHA_CHANNEL?
Currently, only the tif decoder does this.  Are you sending in
your own bits through another mechanism?

Also, is it just the jpeg decoder that you're using for greyscale
images, by setting the last parm to 1 in the decoder?  I don't
want to remove the original code that built a merged palette
unless I'm sure we won't be generating other images without
a palette, that will need this.  (Although I like your idea of
just assuming greyscale for that case).

Ultimately, although slow, this patch does finally allow Microwindows
to display alpha blended images without hardware support.  I think
we need support for alpha channel in more decoders than just
TIF, though.

Regards,

Greg



This patch contains both changes, Alpha channel and greyscale (didn't want
to seperate the patch again).
These are the changes in the order of appearance:
- removed the palette building for 8bpp without palette, because this
indicates a greyscale now
- moved up the clipping - the calculations are not needed if the pixel won't
be set later
- (the endian fix didn't change, only it's indentation)
- Always use GdFindColor instead of the switch - that may be a bit slower
but it's smaller. Inlining is compilers work :-)
- Alpha stuff
- Greyscale stuff

Beware: This patch should have a good review, I didn't check many
combinations of endian, bpp and graphic formats.

Concerning fltk: I'll have to ask my company first. The code is LGPL and
they only need to publish it to people who also got the binaries... I'll be
careful with this copyright stuff.

With regards,

Thomas


Machen Sie aus 14 Cent spielend bis zu 100 Euro!
Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot.
http://www.arcor.de/rd/emf-gaming-1


----------------------------------------------------------------------------
----


: ---------------------------------------------------------------------
: To unsubscribe, e-mail: ####@####.####
: For additional commands, e-mail: ####@####.####


Previous by date: 16 Jun 2005 20:02:10 +0100 Re: valgrind, Greg Haerr
Next by date: 16 Jun 2005 20:02:10 +0100 nanowm does not raise window to top when click window body, 罗建文
Previous in thread: 16 Jun 2005 20:02:10 +0100 Patch: Images with Alpha channel, 8bpp grayscale, skoe.nexgo.de
Next in thread: 16 Jun 2005 20:02:10 +0100 Re: Patch: Images with Alpha channel, 8bpp grayscale, skoe.nexgo.de


Powered by ezmlm-browse 0.20.