Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!bloom-beacon!ZIA.AOC.NRAO.EDU!cflatter From: cflatter@ZIA.AOC.NRAO.EDU (Chris Flatters) Newsgroups: comp.windows.x Subject: Re: Can some one help me with Image package Message-ID: <9010220118.AA25542@zia.aoc.nrao.edu> Date: 22 Oct 90 01:18:51 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 19 Shyam Kotha writes: > I want to acess pixel information of an image and manipulate them for writing > Image processing routines. I dont want to use XPutpixel etc as that slows > down the whole thing, is there any way I can assign a arry containing the > pixel values to the data of the image. You can access the image data directly through the data field of the Ximage structure. However, this can get pretty tricky since you potentially have to keep track of the padding, depth, byte and bit order and image format. Not all of these are under your control. You might want to use direct access to the data in the most common circumstances you might come across (eg. depth == 8 && format == ZPixmap) and XGetPixel/XPutPixel for other circumstances so that your application will at least run (albeit rather slowly) on displays that you didn't anticipate. Chris Flatters