nanogui: transparent support of PNG image


Previous by date: 8 Dec 2006 02:39:30 +0000 Re: GrReadArea return MWPF_PIXELVAL instead MWPF_RGB, Greg Haerr
Next by date: 8 Dec 2006 02:39:30 +0000 FLTK colours fubar'd?, Warren Seymour
Previous in thread: 8 Dec 2006 02:39:30 +0000 Re: transparent support of PNG image, Alex Holden
Next in thread:

Subject: Re: [nanogui] transparent support of PNG image
From: "Greg Haerr" ####@####.####
Date: 8 Dec 2006 02:39:30 +0000
Message-Id: <0a9e01c71a72$0d854460$6401a8c0@winXP>

: PNG has an alpha channel, not a transparent colour. Microwin-aph  
: supported PNGs with alpha channels (the translucent bricks and things  
: in nbreaker were all PNGs).


There's another method that could hack support for PNG
transparent colors without having to bring up the 
fblin32alpha driver, which requires 32bpp hw support.

The XPM image format is currently supported for 
transparent colors with a special hack in
engine/devdraw.c::GdDrawImage().  It checks
whether the image->transcolor is set to 0x01000000,
and the alpha channel is 0x01.  If so, the color
isn't drawn.  This could be changed in the PNG
image decoder engine/image_png.c by setting
pimage->transcolor = 0x01000000, and
then producing a PNG image which uses alpha 0x01
as the transparent color...

Regards,

Greg


Previous by date: 8 Dec 2006 02:39:30 +0000 Re: GrReadArea return MWPF_PIXELVAL instead MWPF_RGB, Greg Haerr
Next by date: 8 Dec 2006 02:39:30 +0000 FLTK colours fubar'd?, Warren Seymour
Previous in thread: 8 Dec 2006 02:39:30 +0000 Re: transparent support of PNG image, Alex Holden
Next in thread:


Powered by ezmlm-browse 0.20.