Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!modulex!morten From: morten@modulex.dk (Morten Hastrup) Newsgroups: comp.windows.x Subject: Re: Help with Ximages and/or pixmaps Message-ID: <696@modulex.dk> Date: 11 Oct 90 11:32:02 GMT References: <9010100124.AA13419@jupiter.risc.com> Organization: A/S MODULEX, Copenhagen, Denmark Lines: 31 kbj@JUPITER.RISC.COM (Ken Johnson) writes: >I am now at the point where I need to display 2D 8 bit images in windows. >I need different sized images and sometimes I need several dozen small >(40x40) images on the screen. I have the raw data in arrays of >unsigned char image[][]; >Do i use pixmaps or do I use XImages? As I see it, you want to display PIXMAPs in a window (or on a widget). >How do I use them? So what you do is first create a IMAGE. This is the way to tell X about the 'look' - this is depth, colors, etc. - of you image. Second you puts the image into a PIXMAP (you could clip the image, if needed, at this point), and use this pixmap on the window (or in a widget). >It is my understanding that I use the low level Xlib functions to do the >dirty work. I've managed to get bounding rectangles and such up but haven't >had luck with the actual XImages. Before you write the code for this, you should look at XPM format and functions - These are publicdomain from Bull. I'll hope this would help you. Mail me if you need further help. -- Morten Hastrup Email: A/S MODULEX Phone: +45 44 53 30 11 Lyskaer 15 Telefax: +45 44 53 30 74 DK-2730 Herlev Denmark