Package: gdk-pixbuf

Function gdk-pixbuf-loader-write

Lambda List

gdk-pixbuf-loader-write (loader buffer count)

Arguments

loader -- a gdk-pixbuf-loader object
buffer -- a Lisp array for image data
count -- an integer with the length of buffer in bytes

Return Value

True if the write was successful, or false if the loader cannot parse the buffer.

Details

This will cause a pixbuf loader to parse the next count bytes of an image. It will return true if the data was loaded successfully, and false if an error occurred.

Example

A code fragment, which writes data into the pixbuf loader:
;; Create the image stream and the GdkPixbufLoader
(setf stream
      (open (sys-path "alphatest.png")
            :element-type '(unsigned-byte 8)))
(setf loader (gdk-pixbuf-loader-new))

...

(let* ((buffer (make-array 128 :element-type '(unsigned-byte 8))) (len (read-sequence buffer stream))) ... ;; Load the buffer into GdkPixbufLoader (gdk-pixbuf-loader-write loader buffer 128) ... )
 

See also

*2021-12-22