nanogui@linuxhacker.org

nanogui@linuxhacker.org


Subject: RE: loadable JPEG + BMP support for nanox !
From: Greg Haerr
Date: Thu, 13 Jan 2000 12:57:53 -0700

: I saw that call to GdmakePaletteConversionTable and I tried this on the
: first shot, but this routine change the system palette (merge the
: palette) and when it came to display another image at the same time on
: the display, the other image, with a different palette what all fucked
: up. For the testing, I was displaying a .jpg and a .bmp at the same time
: on the display ... The jpeg routine was like it is right now and I was
: trying a GdmakePaletteConversion call in the bmp routine ...
: 

Martin - the business of displaying two different images at the same
time, both with different palettes, is very tricky.  As you know, my
current solution is to merge palettes into the system palette,
using a "nextpointer" into the palette for the next entry to rewrite.
The nextpointer can be reset inbetween images, but images
drawn with the old palette must be redrawn then.   This was
my first design, that allowed one image per application with
different palettes, and the fg application would then get the 
physical palette.

Another solution is that I could bring in color quantization 
methods that an application could request, and always
use a standard uniform palette.  This would be passed to
the jpeg decoder, and bmp files would have to be quantized.

What do you think?


: 
: 
: Maybe you're right after all ... the image is much better ... As I told
: you, I'm not an expert in color stuff ... Do you think you could hack
: something better ? I would be happy ... I have only two requirements in
: this area: I want to keep my fast_grayscale output for a color image and
: I want to be able to display a .jpg and a .bmp at the same time on the
: screen with proper display...

The answer here depends on whether you're trying to display
an image that looks great, or just looks good.  Have you
tried just displaying using the uniform palette only?  That is,
no MERGE code.  Otherwise, we could assign priorities
from the application.

Regards,

Greg


nanogui@linuxhacker.org