[comp.windows.x] XImage

kali@tut.fi (Salo Juha) (07/25/89)

Hello Xperts,

I noted in O'Reilly's Xlib book that there should be a newsgroup or
mailing list for X users interested in image processing called ximage.
However, I can't find it from the netnews list supplied at our domain.

So, how can I access the 'ximage' group?

Please e-mail answers to
	kali@tut.fi

thanks in advance 
--
 \   	J.Salo / Tampere University on Technology, FINLAND
>8-)=     _	kali@tut.fi, kali@tut.uucp, kali@tut.eunet
 /

cheung@marble.sw.mcc.com (Po Cheung) (10/26/89)

To invert an XImage, I can think of creating a pixmap of same size and
depth, copying the image (with XPutImage and GXcopyInverted) into the 
pixmap, and retrieving the image back from the pixmap (XGetImage). 

Is this the right way?  Does it mean all graphics operations on images
have to go through a pixmap?

Thanks.

madd@world.std.com (jim frost) (10/27/89)

In article <3048@marble.sw.mcc.com> cheung@marble.sw.mcc.com (Po Cheung) writes:
|To invert an XImage, I can think of creating a pixmap of same size and
|depth, copying the image (with XPutImage and GXcopyInverted) into the 
|pixmap, and retrieving the image back from the pixmap (XGetImage). 
|
|Is this the right way?  Does it mean all graphics operations on images
|have to go through a pixmap?

No, you can do each of them yourself in the client with either
GetPixel/PutPixel or your own (presumably much faster) functions.  I
did the latter when creating my xloadimage program, mostly because X
supports very few image manipulations (which is as it should be, I
think).

The only problem with creating your own images manipulation routines
is that XImages might be in many different bit and byte orders.  I get
around this by using my own image format and setting up the XImage to
match (which works very well).

It's probably best to think of X as a display server and not an image
manipulation utility; it's good at displaying images but most of the
trivial image manipulation functions that it provides are really best
used as graphical operations with draw commands (eg GXcopyinverted
might be used to invert a menu option).

jim frost
software tool & die     "The World" Public Access Unix for the '90s
madd@std.com            +1 617-739-WRLD  24hrs {3,12,24}00bps

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (10/28/89)

    To invert an XImage, I can think of creating a pixmap of same size and
    depth, copying the image (with XPutImage and GXcopyInverted) into the 
    pixmap, and retrieving the image back from the pixmap (XGetImage).

That's a possible way, but probably not the fastest (although it depends
a lot on the size of the image, and the relative performance of the client,
the server, and the network connection).  You can simply use XGetPixel and
XPutPixel and do it all on the client side.  The GetPixel/PutPixel code is
rather slow in R3, but this will be fixed in R4.

kek@DINORAH.WUSTL.EDU (10/30/89)

eb, susan, ijadi