LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 04-28-2003, 02:35 AM   #1
yrraja
Member
 
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114

Rep: Reputation: 15
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
 
Old 04-28-2003, 07:10 AM   #2
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
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?
 
Old 04-28-2003, 07:27 AM   #3
yrraja
Member
 
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114

Original Poster
Rep: Reputation: 15
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
 
Old 04-29-2003, 02:52 AM   #4
yrraja
Member
 
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114

Original Poster
Rep: Reputation: 15
Come on gurus.. tell me something!!
 
Old 04-29-2003, 11:54 PM   #5
yrraja
Member
 
Registered: Sep 2002
Distribution: RH, FC, Ubuntu, Solaris, AIX
Posts: 114

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
downloading a bit different images with jigdo dvm Debian 2 06-10-2005 05:16 AM
Python: Bit masking images? sienarot Programming 1 03-06-2004 02:46 PM
Converting 32 bit to 64 and vise versa linux rajamp Linux - Hardware 3 11-16-2003 12:50 PM
32 bit or 16 bit mode in XF86Config-4 uglydot Linux - Hardware 4 06-25-2003 02:07 PM
Graphic Card that Supports displaying 8-bit and 24-bit images simultaneously yrraja Linux - Hardware 2 04-30-2003 06:41 AM


All times are GMT -5. The time now is 04:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration