nanogui: Thread: transparent support of PNG image


[<<] [<] Page 1 of 1 [>] [>>]
Subject: transparent support of PNG image
From: Eric Co ####@####.####
Date: 1 Dec 2006 10:51:11 +0000
Message-Id: <45700917.7030400@outline.com.hk>

Hi all,

I am trying to use transparent PNG image, but i found it unable to display
the transparent effect of PNG file. So is the transparent PNG don't support
in microwindows, or I need to change some configs?

Thanks!
Eric Co


Subject: Re: [nanogui] transparent support of PNG image
From: "Greg Haerr" ####@####.####
Date: 6 Dec 2006 23:08:00 +0000
Message-Id: <06c101c7198b$5a0516e0$0300a8c0@RDP>

:  So is the transparent PNG don't support
: in microwindows

No, transparent PNG's aren't supported.
You will need to modify engine/image_png.c,
and set the image.transcolor to the 
transparent color of the PNG image.  Read
up on the PNG library for details on 
how to find the transparent color.

Regards,

Greg

Subject: Re: [nanogui] transparent support of PNG image
From: Alex Holden ####@####.####
Date: 7 Dec 2006 08:27:53 +0000
Message-Id: <2C9091E1-752A-4B10-89DE-CB26EE51FC96@linuxhacker.org>

On 6 Dec 2006, at 23:07, Greg Haerr wrote:
> :  So is the transparent PNG don't support
> : in microwindows
> No, transparent PNG's aren't supported.
> You will need to modify engine/image_png.c,
> and set the image.transcolor to the
> transparent color of the PNG image.  Read
> up on the PNG library for details on
> how to find the transparent color.

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

-- 
------------ Alex Holden - http://www.alexholden.net/ ------------
If it doesn't work, you're not hitting it with a big enough hammer


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

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.