For cases where the image representation is not needed, CLX provides functions to read and display image data directly.
|get-raw-image||drawable &key :data (:start 0) :x :y :width :height :plane-mask (:format :z-format) (:result-type ' (vector card8))||Function|
Returns a sequence of image data from the region of the drawable given by :x, :y, :width, and :height. If :data is given, it is modified beginning with the element at the :start index and returned. The depth and visual type ID of the drawable are also returned.
The bits for all planes selected by 1 bits in the :plane-mask are returned as zero; the default :plane-mask is all 1 bits. The :format of the returned pixel values may be either :xy-format or :z-format. The :result-type defines the type of image data returned.
|put-raw-image||drawable gcontext data &key (:start 0) :depth :x :y :width :height (:left-pad 0) :format||Function|
Displays a region of the image data defined by :start, :left-pad, :width, and :height on the destination drawable, with the upper-left pixel of the image region displayed at the drawable position given by :x and :y.
The :format can be either :xy-pixmap, :z-pixmap , or :bitmap. If :xy-pixmap or :z-pixmap formats are used, :depth must match the depth of the destination drawable. For :xy-pixmap, the data must be in XY format. For :z-pixmap, the data must be in Z format for the given :depth.
If the :format is :bitmap, the :depth must be 1. In this case, the image is combined with the foreground and background pixels of the gcontext. 1 bits of the image are displayed in the foreground pixel and 0 bits are displayed in the background pixel.
The :left-pad must be zero for :z-pixmap format. For :bitmap and :xy-pixmap formats, the :left-pad must be less than the bitmap-scanline-pad for the drawable's display (see display-bitmap-format). The first :left-pad bits in every scanline are to be ignored by the server; the actual image begins that many bits into the data.
The following attributes of the gcontext are used to display the image: clip-mask, clip-x, clip-y, function, plane-mask, and subwindow-mode.