Re: CLX xy-pixmap
Raymond Toy <[email protected]>
| Newsgroups | gmane.lisp.cmucl.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "ignotus" == ignotus <[email protected]> writes: ignotus> Hello, I try to use the CLX library but I don't know how to view these ignotus> pixmaps I get via GET-IMAGE. ignotus> Here is an example: ignotus> ,---- ignotus> | (require 'clx) ignotus> | (in-package :xlib) ignotus> | ignotus> | (defun test () ignotus> | (let* ((d (open-display "127.0.0.1" :display +display+)) ignotus> | (s (car (display-roots d))) ignotus> | (w (screen-root s))) ignotus> | (get-image w ignotus> | :x 0 :y 0 ignotus> | :width (drawable-width w) ignotus> | :height (drawable-height w) ignotus> | :format :xy-pixmap) ignotus> | ;t ignotus> | )) ignotus> | ignotus> | (write-bitmap-file "/tmp/test.xpm" (test)) ignotus> `---- ignotus> That test.xpm file is unreadable for Gimp etc. How can I view that ignotus> file? ignotus> Looks like this: ignotus> ,---- ignotus> | #define image_width 1024 ignotus> | #define image_height 768 ignotus> | #define image_blue_mask 31 ignotus> | #define image_green_mask 2016 ignotus> | #define image_red_mask 63488 ignotus> | static char image_bits[] = { ignotus> | 0x2b,0x00,0x00,0x00,0x2b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x14,0x33,0x3b, ignotus> | 0x40,0xf8,0xf7,0xfe,0xbf,0x94,0xf7,0xfe,0xbf,0x9c,0x51,0xff,0xbf,0x00,0x00, ignotus> | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ignotus> | 0x00,0x00,0x00,0xaa,0xb3,0x6a,0x08,0x23,0x00,0x00,0x00,0x13,0x32,0x00,0x00, ignotus> |.......... I'm not very familiar with this stuff, but isn't this the X11 bitmap format? xv recognizes this. xbmtopbm seems to recognize this too. Ray