Path: utzoo!attcan!uunet!nih-csl!lhc!mimsy!haven!udel!wuarchive!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Can some one help me with Image package Message-ID: <9010201237.AA05400@Larry.McRCIM.McGill.EDU> Date: 20 Oct 90 12:37:44 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 22 > 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. > what I am looking for is something like assigning memory pixrect in > Sunview. (i.e) equivalent for > mpr_d(mem)->md_image =(short *) buf; > where buf is an array containing the pixel values and mem is a memory > pixrect. XCreateImage takes a pointer to the data as one of its arguments. Unfortunately there is no clean way (as far as I can tell) to get an XImage with bit and byte sex set the way *you* want them instead of the way *the server* wants them. It works, in my experience, to just bash the values in the structure after creating it, but this is hardly a proper solution. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu