color image display

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

5 posts / 0 new
Last post
color image display

Submitted by Anonymous on Tue, 07/17/2001 - 18:07. Developers
Hi, there,

I believe this maybe very easy for you. But it holds me back for a
couple of days. Please answer my question !!

I was trying to display a PNM image using Motif. I already sucessfully
read the images in. The program store the red, green, blue values of
each pixel correctly. Right now, my problem is how to display it. I
don`t know how to orgnize the three color into the image data. Should I
use TrueColor or DirectColor?

I am new to unix/motif programming. Any suggestions will be highly
appreciated. It will especially helpful if you can post some examples.

Thanks a lot.

Fan

ICS_support

When you say "image", you should really mean the XImage -- that is, the client-side data structure which is appropriate for this sort of pixel-oriented data. XImages can be created in several different types; the XY-oriented one is easiest to deal with. You`ll then need to render the image to a window or pixmap created with the appropriate visual, which might be TrueColor, DirectColor, or PseudoColor.

The Oliver Jones book on "Introduction to the X Window System" is great for low-level information on X -- colormaps, visuals, and images. You should try to find it.

You`ll also find the source code for "xwd" and "xv" to be useful; those programs handle different types of visuals.

Anonymous

Hi,
I`m interested in the suggested book but I could not find it, so could you please tell me
the ISBN code if it`s possible, for me to be able to buy it.

Thanks!!!

Anonymous

Hi,
The suggested book`s ISBN code is ISBN 0-13-499997-5

Anonymous

I would look at the extravagent linux image libraries which include (optionally) even things like color correction as well as using ".jpeg" and not having to convert! I beleive these libs know their way around "X" low level calls.

I think gv uses these libraries. There are soo many.

I notices that XThemes from MotifZone uses some of these libs to provide [high color] images for buttons and other widgety mwm resources.

But? What is wrong with the xpm format that can be used even in the .mwmrc file? It has support for colors (though you could likely correct me on just how many).