Displaying 8-bit images in 24-bit mode and vice versa

Displaying 8-bit images in 24-bit mode and vice versa

Post by Yase » Tue, 29 Apr 2003 15:31:03


Hi,

I am having trouble displaying 8-bit images in 24-bit mode vice versa.
I have images in XWD format and when i display them using the "xwud"
utility, the image is displayed but everything in the background
changes its color. The background turns normal only when I unselect or
close this image window.

Similarly in 8-bit mode when I try to display 24-bit image, i get the
following error:

"xwud: Error => Visual type is not large enough to hold all colors of
the image."

I require this feature to test my application which displays images
with different depths simultaniously. I am using following:

OS:             Redhat Linux 7.3
System:         P4 1.7GHz
VGA:            NVidia GeForce2 MX/MX400

I have tested this application on Sun Solaris and it is working fine.
Any one has any solution to this problem?

Regards,
Yaser

 
 
 

Displaying 8-bit images in 24-bit mode and vice versa

Post by Jim Bianc » Wed, 30 Apr 2003 09:19:47



Quote:>I am having trouble displaying 8-bit images in 24-bit mode vice versa.
>I have images in XWD format and when i display them using the "xwud"
>utility, the image is displayed but everything in the background
>changes its color. The background turns normal only when I unselect or
>close this image window.

        Sounds like a colormap problem. When that window has focus, it grabs
the colormap and uses it for its own purposes. Thus the image will display
colors correctly, but the background (and everything else) will show weird
colors -- because the colormap has been 'taken over' by the image, leaving
insufficient colors for everything else (or something). This problem used to
happen to me when I ran Netscape. As soon as that window got focus, every
other window and the background went to bizarro city, colorwise. I recall
something in the setup options about using a custom (as opposed to the
standard colormap -- I *think*) that cured this.

        From man xwud:

 -new    This option forces creation of a new colormap for displaying the
               image. If the image characteristics happen to match those of
               the display,this can get the image on the screen faster, but at
               the cost of using a new colormap (which on most displays will
               cause other windows to go technicolor).

 -std maptype
             This option causes the image to be displayed using the specified
               Standard Colormap.  The property name is obtained by converting
               the type to upper case, prepending "RGB_", and appending "_MAP".
               Typical types are "best", "default", and "gray". See xstd-
               cmap(1) for one way of creating Standard Colormaps.

        You might want to investigate this colormap thing, as it sounds as
if that's what is happening. I've never used xwud, so I can't really help
you more. I just took the easy way out and bought a video card with
sufficient on board RAM to support multiple colormaps. That seems to be the
best answer, actually. Get a vid card with more on board RAM (or upgrade
your existing vid card). 16megs should do it nicely, but 8 will prob be
sufficient. If you already have such a card, you might want to check to see
if the correct amount of video RAM is listed in your /etx/X11/XF86Config* file.

--

Eclectic Garbanzo BBS, (707) 539-1279

"My parents just came back from a planet where the * lifeform
had no bilateral symmetry, and all I got was this stupid F-Shirt."

 
 
 

1. 8-bit display on 24-bit system?

Does anyone know how to get a SPARC 5 with a generic 24-bit graphics
adapter to run an application that will only work with an 8-bit or mono
display?

Rob Chown
Information Technology Services
University of Southern Queensland
-------------------------------------

2. nmap problem

3. 8-bit display on a 24-bit adapter?

4. Network monitoring system wish list

5. 8-bit 24-bit visuals ?

6. Solaris -> OpenBSD IPSec connection

7. Configure X server for both 8-bit and 24-bit colour?

8. simple routing problem

9. 8-bit color in 24-bit visual?

10. from 24-bit planes to 8-bit planes

11. Trouble with Creator Graphics 3D 8 bit and 24 bit mode simultaneously?

12. XFree86 and 8 bit PseudoColor on 24 bit displays

13. CDE switching from 8 bit display to 24 bit