: I try to draw transparency PNG images in my nano-X application but all
: the time the transparency's part of it is displayed in black..

Make sure you're using the CVS code, as there were earlier bugs
in transparency. v0.90 is definitely buggy.


: I tried to display it on an window created by
: GrNewWindow(GR_ROOT_WINDOW_ID, 0, 0, 480, 640, 0, WHITE, BLACK);

Using BLACK here is a bad idea, as you can't tell whether the
transparency is being drawn BLACK, or whether BLACK is
showing through.

I don't have the source code handy, but each image decoder
handles transparency differently.  I know we support GIF transparency,
I'm not sure whether PNG was added.  And below you're
saying the .xpm works.  You can check the source
looking for ".transcolor" or "->transcolor" being set
to something other than NOCOLOR.  The decoders then
don't draw a pixel when the image color matches transcolor.


: 
: I tried with GrLoadImageFromFile plus GrDrawImageToFit and with
: GrDrawImageFromFile too, and same result.

Yes, each of these use the same decoder, depending on image type.

Regards,

Greg





: When I convert this image in .xpm and use the same code (just changing
: th extension of the file to load) everything gonna be ok.
: 
: Can anybody help me please ?
: 
: Regards,
: 
: Vincent BRACH
: 
: 
: 
: 
: 
: 
:

---------------------------------------------------------------------
To unsubscribe, e-mail: nanogui-unsubscr...@linuxhacker.org
For additional commands, e-mail: nanogui-h...@linuxhacker.org

Reply via email to