Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-28-2003, 02:35 AM
|
#1
|
Member
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114
Rep:
|
Displaying 8-bit images in 24-bit mode and vice versa
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
|
|
|
04-28-2003, 07:10 AM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018
Rep:
|
I'm afraid I can't help you with implementation details much... Obviously you can't display 24-bit color in 8-bit mode, without doing some dithering or some such.
I know that when the entire screen changes color, it probably means that the display is adjusting its palette to match that of the image. For example, if you are in 8-bit mode, you can only have 256 colors on the screen at once. If you load an 8-bit image that uses 256 colors, the entire screen has to be drawn using colors from that image (again, assuming you don't dither using some standard color palette instead).
All I can offer is the suggestion: For 24 bit color depth, you should be able to display any images up to 24-bit color. If you're in 8-bit color depth, though, you'll have to do some approximation to the closest available color. Perhaps xwud has some option for doing this?
|
|
|
04-28-2003, 07:27 AM
|
#3
|
Member
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114
Original Poster
Rep:
|
Thanx wapcaplet,
In Sun Solaris i have used 'xwud' to display 24-bit images in 8-bit mode and 8-bit images in 24-bit mode successfully. Solaris somehow manages this, what i dont understand is why doesnt it work in Linux as well. The code for Solaris and Linux is almost the same except for minor differences. Therefore it has to be a limitation of either the hardware or linux X server.
Any comments will be appretiated.
Yaser
|
|
|
04-29-2003, 02:52 AM
|
#4
|
Member
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114
Original Poster
Rep:
|
Come on gurus.. tell me something!!
|
|
|
04-29-2003, 11:54 PM
|
#5
|
Member
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114
Original Poster
Rep:
|
Ok new informaion that i have is that in linux if I use the Overlay feature then i can display 8-bit image in 24-bit mode.
But the thing is i dont want that. I want the behaviou as Solaris shows. In Solaris this is done without the overlays, and an actual window of 8-bit depth is opened in 24-bit mode. If you check the properties of that window using 'xwininfo' command, it will show that this is 8-bit window using Pseudocolor. Similarly in 8-bit mode 24-bit images are displayed by opening a 24-bit window. So far it seems that this is some short coming of XFree86.
Any comments???
Yaser
|
|
|
All times are GMT -5. The time now is 09:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|