nanogui: Thread: Alpha channel whit nano-x 0.91


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Alpha channel whit nano-x 0.91
From: "Marco Rossi" ####@####.####
Date: 8 May 2006 07:50:30 +0100
Message-Id: <008e01c6726b$7a8f0be0$0c08a8c0@marco>

After to have resolved the problems with the transparencies of .GIF
In order to design the image .PNG  whit transparency and alpha channel.
unfortunately the result is one full image without transparencies.
How I can use the alpha channel with NANO-X  0.91?

Regards,
Marco


L'informativa ai sensi del D.Lgs 196/2003 (Codice della Privacy) sul sito
www.corghi.com
Subject: Re: [nanogui] Alpha channel whit nano-x 0.91
From: "Greg Haerr" ####@####.####
Date: 8 May 2006 17:09:03 +0100
Message-Id: <0e5d01c672b9$b522f0c0$6401a8c0@winXP>

: In order to design the image .PNG  whit transparency and alpha channel.
: unfortunately the result is one full image without transparencies.
: How I can use the alpha channel with NANO-X  0.91?

You'll need some slight modifications to the PNG decoder
in engine/image_png.c.  When the PNG has an alpha channel,
you'll need the code to do the following (but only in that case):

1. Set pimage->compression is set to MWIMAGE_RGB |
MWIMAGE_ALPHA_CHANNEL.

2. Don't call the png_set_strip_alpha(state) function.

This should result in a ARGB-code image file.

Regards,

Greg

Subject: Alpha channel whit nano-x 0.91
From: "Marco Rossi" ####@####.####
Date: 9 May 2006 16:22:35 +0100
Message-Id: <003f01c6737c$2e85d6e0$0c08a8c0@marco>

::You'll need some slight modifications to the PNG decoder
::in engine/image_png.c.  When the PNG has an alpha channel,
::you'll need the code to do the following (but only in that case):

::1. Set pimage->compression is set to MWIMAGE_RGB |
::MWIMAGE_ALPHA_CHANNEL.

::2. Don't call the png_set_strip_alpha(state) function.

::This should result in a ARGB-code image file.

::Regards,
::Greg

I have executed your instructions (also I have set 32bpp because with 24bpp
I had an segmentation foult error )
but the result is one full image without transparencies.

In order to visualize the rows I have used the functions GrDrawImageToFit
and GrDrawImageFromFile.
I am working on  Linux PC whit framebuffer.

where mistake?

Regards,
Marco

L'informativa ai sensi del D.Lgs 196/2003 (Codice della Privacy) sul sito
www.corghi.com
Subject: Re: [nanogui] Alpha channel whit nano-x 0.91
From: "Greg Haerr" ####@####.####
Date: 10 May 2006 07:12:49 +0100
Message-Id: <16c201c673f8$c112db80$6401a8c0@winXP>

: ::You'll need some slight modifications to the PNG decoder
: ::in engine/image_png.c.  When the PNG has an alpha channel,
: ::you'll need the code to do the following (but only in that case):
: ::This should result in a ARGB-code image file.
:
: I have executed your instructions (also I have set 32bpp because with
24bpp
: I had an segmentation foult error )
: but the result is one full image without transparencies.
:
: In order to visualize the rows I have used the functions GrDrawImageToFit
: and GrDrawImageFromFile.
: I am working on  Linux PC whit framebuffer.

First, this only results in an ARGB decoded image.  Now
you've got to display the alpha channel image.  Note that
nano-X doesn't really support software alpha, the alpha
patch was for hardware alpha support.  However, there
are some functions that will work with software alpha.
One of these is GrCopyArea, where the mode parameter
can use alpha channel.  (look up the list of allowed values
in the include header file).  However - there's still more
problems, because I don't think any of the image functions
support software alpha, only the GdBlit function, which
GrCopyArea uses.  So you'll need to trace the code
path a bit: look at engine/devdraw.c::GdDrawImage()
and see whether it supports software alpha, or
whether it calls a new lower level driver function
DrawArea, which might implement software alpha.

Hope this helps

Regards,

Greg

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


Powered by ezmlm-browse 0.20.