Package: gdk-pixbuf
Class gdk-pixbuf
Superclassesg-object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gdk-pixbuf object contains information that describes an image
in memory.
It contains information about the image's pixel data, its color space, bits
per sample, width and height, and the rowstride (the number of bytes between
the start of one row and the start of the next). Image DataExamples(defun put-pixel (pixbuf x y red green blue alpha) (let ((n-channels (gdk-pixbuf-n-channels pixbuf)) (rowstride (gdk-pixbuf-rowstride pixbuf)) (pixels (gdk-pixbuf-pixels pixbuf))) ;; Add offset to the pointer pixels into the pixbuf (incf-pointer pixels (+ (* y rowstride) (* x n-channels))) ;; Set the color of the point and the alpha value (setf (mem-aref pixels :uchar 0) red) (setf (mem-aref pixels :uchar 1) green) (setf (mem-aref pixels :uchar 2) blue) (setf (mem-aref pixels :uchar 3) alpha)))This function will not work for pixbufs with images that are other than 8 bits per sample or channel, but it will work for most of the pixbufs that GTK+ uses. Note | Slot Access Functions
Inherited Slot Access Functions |
2021-12-12