Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!oberon!sdcrdcf!trwrb!aero!foonberg From: foonberg@aerospace.aero.org (Alan Foonberg) Newsgroups: comp.windows.x Subject: Possible bug in CLX's put-raw-image? Message-ID: <270@antares.aero.org> Date: 6 Apr 88 17:05:26 GMT Reply-To: foonberg@antares.UUCP () Organization: The Aerospace Corporation, El Segundo, CA Lines: 54 -------- I'm running CLX Release 2 on a SUN 3/160C with 16 Meg of memory, under Sun UNIX 4.2 Release 3.2. I am able to create a somewhat large pixmap and associated raw image by using create-pixmap and get-raw-image. What results is a long array containing the bytes of the image. I then write these bytes to a file. In another program, I read the file into an array, create a pixmap, and try to put-raw-image the array onto the pixmap. This fails for larger images. I have tried this using the Sun both as a monochrome device and a color device, and both fail. However, when I have pixmaps of depth 8, the area of the biggest pixmap I can put-raw-image onto is smaller than when I have pixmaps of depth 1. The limiting factor seems to be the length of the array used by get-raw-image and put-raw-image. The largest array that has worked for me is 129,240 bytes long. The smallest array that hasn't worked is 132,112 bytes long. It may be a coincidence, but 2^17 is 131,072, which is suspiciously in between my two limiting cases. It is always put-raw-image that fails. The immediate error message I get is: >>Error: couldn't write buffer to file #P"Unknown_file" at position 98455, broken pipe XLIB::BUFFER-WRITE-DEFAULT: Required arg 0 (VECTOR): # Required arg 1 (DISPLAY): # Required arg 2 (START): 0 Required arg 3 (END): 4096 As I control-n up the stack, the routines called along the way are XLIB::BUFFER-WRITE, XLIB::BUFFER-FLUSH, XLIB::WRITE-VECTOR-CARD8, and PUT-RAW-IMAGE. The DATA argument to WRITE-VECTOR-CARD8 is #, BOFFSET is 132, START is 0, END is 132112. The DATA argument to PUT-RAW-IMAGE is #, START is 0, DEPTH is 1, X and Y are 0, WIDTH is 1441, HEIGHT is 718, LEFT-PAD is 0, and FORMAT is :Z-PIXMAP. I would appreciate any help anyone could offer. Thanks, Alan Foonberg The Aerospace Corporation foonberg@aerospace.aero.org