nanogui: Images not drawn (FLTK+nxlib app with nano-X)


Previous by date: 18 Jan 2006 20:43:35 +0000 NOFONTSORCLIPPING = Y, Manav Kataria
Next by date: 18 Jan 2006 20:43:35 +0000 Re: NOFONTSORCLIPPING = Y, Greg Haerr
Previous in thread: 18 Jan 2006 20:43:35 +0000 Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas
Next in thread: 18 Jan 2006 20:43:35 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas

Subject: Re: [nanogui] Images not drawn (FLTK+nxlib app with nano-X)
From: "Greg Haerr" ####@####.####
Date: 18 Jan 2006 20:43:35 +0000
Message-Id: <07c601c61c6f$d7b68b10$6401a8c0@winXP>

> The problem is that most of my images (mostly 32x32 icons) are not
drawn/shown at all.
Some images are being loaded from files but most are statically stored in
arrays (FLTK loads them and puts them into code during code generation).
There is one image that shows up correctly and one that is almost right
(there is some color issue that is not exactly right but I will get to that
another time).

Image display using NXLIB can run into problems quickly.  Xlib has a HUGE
section of code for XPutImage that will convert any format image to any
other format, negotiated with the XServer, etc.  Since I had no desire to
rewrite all of X11's image code, we don't perform all these conversions.
That is to say, X11 will allow any bpp image format to be displayed,
regardless
of the server hw format.   With nano-X, originally, we only allowed a single
bitmap format (not to be confused with MWIMAGEHDR format, which is
different, here we're talking about pixmap formats): we allowed only the
hw bpp format.  That is, if you're running 16bpp 565, then the pixmap
had to be in that format.  In most cases, this was never an issue, including
almost all X11 programs I've come across.  Except - we needed to handle
1bpp (monochrome) images, regardless of hw bpp format.  So there
is some code in NXLIB to handle that conversion; although it isn't complete,
since nano-X itself doesn't actually handle that format (which is the
ultimate
proper fix).

I don't know yet what the issue is with your images, but we need to get some
debug code that shows what format the image is arriving in (I think there's
already debug code in Image.c::putImage() that does this).

Please give some more detailed info so I can help debug this issue.



> When I checked the foreground/background values, they were both zero which
I already discovered do not work properly when drawing fonts.
After I changed the foreground color to 1, there was no change; still no
images.
This makes sense to me because the foreground/background values should not
be used when drawing images because it should be a straight memory copy from
an image array to frame buffer (with some conversions).

Agreed.  Image output doesn't use fg/bg values, unless its a monochrome
image,
see above.


> My belief is that the images are either drawn transparent or not drawn at
all but what would decide why some images are drawn and some are not?

I'm not aware of Xlib supporting transparency on pixmaps without extensions.
We
need to find what mechanism is being used for transparent drawing.  Mono
bitmaps
can be drawn using fg only, thus allowing single color transparent drawing.

Regards,

Greg



Previous by date: 18 Jan 2006 20:43:35 +0000 NOFONTSORCLIPPING = Y, Manav Kataria
Next by date: 18 Jan 2006 20:43:35 +0000 Re: NOFONTSORCLIPPING = Y, Greg Haerr
Previous in thread: 18 Jan 2006 20:43:35 +0000 Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas
Next in thread: 18 Jan 2006 20:43:35 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas


Powered by ezmlm-browse 0.20.