Up: cl-cffi-gtk4 API documentation

Package gdk-pixbuf

GdkPixbuf is a toolkit for loading images and manipulating pixel buffers. The library provides facilities for loading and saving images, as well as fast scaling and compositing of pixbufs. It can also load simple animations, such as animated GIFs. This is the API documentation for the Lisp binding to the GdkPixbuf library.

About This Package

Library version
GdkPixbufFormat
The GdkPixbuf object
Image Data in Memory
File Loading
File Saving
Scaling
GdkPixbufLoader
Animations

Library version

Contains the full version of the GdkPixbuf library as a string. ...

The major version number of the GdkPixbuf library. ...

The minor version number of the GdkPixbuf library. ...

The micro version number of the GdkPixbuf library. ...

Returns the version of the GdkPixbuf library as a human readable string of the form "x.y.z". ...

GdkPixbufFormat

The gdk-pixbuf:pixbuf-format structure contains information about the image format accepted by a module. ...

Obtains the available information about the image formats supported by the gdk-pixbuf:pixbuf API. ...

Returns the name of the image format. ...

Returns a description of the image format. ...

Returns the MIME types supported by the image format. ...

Returns the filename extensions typically used for files in the given image format. ...

Returns true if the save option specified by option is supported when saving a pixbuf using the module implementing the image format. ...

Returns whether pixbufs can be saved in the given image format. ...

Returns whether this image format is scalable. ...

Returns whether this image format is disabled. ...

Disables or enables an image format. ...

Returns information about the license of the image loader for the image format. ...

The GdkPixbuf object

This enumeration defines the color spaces that are supported by the GdkPixbuf library. ...

The gdk-pixbuf:pixbuf object contains information that describes an image in memory. ...

The accessor for the bits-per-sample slot queries the number of bits per color sample in a pixbuf. ...

The accessor for the colorspace slot querries the colorspace in which the samples are interpreted. ...

The accessor for the has-alpha slot queries whether a pixbuf has an alpha channel (opacity information). ...

The accessor for the height slot queries the height of a pixbuf. ...

The accessor for the n-channels slot queries the number of channels of a pixbuf. ...

The accessor for the pixel-bytes slot querries the readonly pixel data. ...

The accessor for the pixels slot queries a pointer to the pixel data of a pixbuf. ...

The accessor for the rowstride slot queries the rowstride of a pixbuf, which is the number of bytes between the start of a row and the start of the next row. ...

The accessor for the width slot queries the width of a pixbuf. ...

Returns the length of the pixel data, in bytes. ...

Gets or sets a key/value pair as an option to a pixbuf. ...

Remove the key/value pair option attached to a pixbuf. ...

Copy the key/value pair options attached to a pixbuf to another. ...

Returns a read-only pointer to the raw pixel data. ...

Takes an existing pixbuf and adds an alpha channel to it. ...

Copies a rectangular area from src to dest. ...

Modifies saturation and optionally pixelates src, placing the result in dest. ...

Takes an existing pixbuf and checks for the presence of an associated "orientation" option. ...

Clears a pixbuf to the given RGBA value, converting the RGBA value into the pixel format of the pixbuf. ...

Flips a pixbuf horizontally or vertically and returns the result in a new pixbuf. ...

Image Data in Memory


Introduction to image data in memory

The gdk-pixbuf:pixbuf-new function can be used as a convenience to create a pixbuf with an empty buffer. This function will compute an optimal rowstride so that rendering can be performed with an efficient algorithm. The gdk-pixbuf:pixbuf-new-from-bytes function creates a new gdk-pixbuf:pixbuf object out of in-memory readonly image data from a g:bytes instance. Currently only RGB images with 8 bits per sample are supported.

You can also copy an existing pixbuf with the gdk-pixbuf:pixbuf-copy function. The copy function will actually duplicate the pixel data in memory and create a new gdk-pixbuf:pixbuf instance for it.

Functions for Image Data in Memory

Creates a new pixbuf and allocates a buffer for it. ...

Creates a new pixbuf out of in-memory readonly image data. ...

Creates a new pixbuf which represents a sub-region of pixbuf. ...

Creates a new pixbuf with a copy of the information in the specified pixbuf. ...

File Loading


Introduction to File Loading

The GDKPixbuf library provides a simple mechanism for loading an image from a file in synchronous fashion. This means that the library takes control of the application while the file is being loaded. From the user's point of view, the application will block until the image is done loading.

This interface can be used by applications in which blocking is acceptable while an image is being loaded. It can also be used to load small images in general. Applications that need progressive loading can use the gdk-pixbuf:pixbuf-loader API functionality instead.

Functions for File Loading

Creates a new pixbuf by loading an image from a file. ...

Creates a new pixbuf by loading an image from a file. ...

Creates a new pixbuf by loading an image from a file. ...

Creates a new pixbuf by loading an image from a resource. ...

Creates a new pixbuf by loading an image from an resource. ...

Parses an image file far enough to determine its format and size. ...

Asynchronously parses an image file far enough to determine its format and size. ...

Finishes an asynchronous pixbuf parsing operation started with the gdk-pixbuf:pixbuf-file-info-async function. ...

File Saving


Introduction to File Saving

These functions allow to save a gdk-pixbuf:pixbuf object in a number of file formats. The formatted data can be written to a file or to a memory buffer. The gdk-pixbuf:pixbuf library can also call a user-defined callback on the data, which allows to write the image to a socket or store it in a database.

Functions for File Saving

Saves pixbuf to a file in format type. ...

Scaling


Introduction to Scaling

The gdk-pixbuf:pixbuf library contains functions to scale pixbufs, to scale pixbufs and composite against an existing image, and to scale pixbufs and composite against a solid color or checkerboard. Compositing a checkerboard is a common way to show an image with an alpha channel in image-viewing and editing software.

Since the full-featured gdk-pixbuf:pixbuf-scale, gdk-pixbuf:pixbuf-composite, and gdk-pixbuf:pixbuf-composite-color functions are rather complex to use and have many arguments, two simple convenience functions are provided, the gdk-pixbuf:pixbuf-scale-simple and gdk-pixbuf:pixbuf-composite-color-simple functions which create a new pixbuf of a given size, scale an original image to fit, and then return the new pixbuf.

If the destination pixbuf was created from a readonly source, these operations will force a copy into a mutable buffer.

Functions for Scaling

This enumeration describes the different interpolation modes that can be used with the scaling functions. ...

The possible rotations which can be passed to the gdk-pixbuf:pixbuf-rotate-simple function. ...

Create a new pixbuf containing a copy of pixbuf scaled to width x height. ...

Creates a transformation of the source image src by scaling by xscale and yscale then translating by xoffset and yoffset, then renders the rectangle (x,y,width,height) of the resulting image onto the destination image replacing the previous contents. ...

Creates a transformation of the source image src by scaling by xscale and yscale then translating by xoffset and yoffset. ...

Creates a new gdk-pixbuf:pixbuf object by scaling src to width x height and compositing the result with a checkboard of colors color1 and color2. ...

Creates a transformation of the source image src by scaling by xscale and yscale then translating by xoffset and yoffset, then composites the rectangle (x,y,width,height) of the resulting image with a checkboard of the colors color1 and color2 and renders it onto the destination image. ...

Rotates a pixbuf by a multiple of 90 degrees, and returns the result in a new pixbuf. ...

GdkPixbufLoader

The gdk-pixbuf:pixbuf-loader class provides a way for applications to drive the process of loading an image, by letting them send the image data directly to the loader instead of having the loader read the data from a file. ...

Creates a new pixbuf loader object. ...

Creates a new pixbuf loader that always attempts to parse image data as if it were an image of type itype, instead of identifying the type automatically. ...

Creates a new pixbuf loader that always attempts to parse image data as if it were an image of MIME type mtype, instead of identifying the MIME type automatically. ...

Obtains the available information about the format of the currently loading image file. ...

This will cause a pixbuf loader to parse the next count bytes of an image. ...

This will cause a pixbuf loader to parse a buffer inside a g:ytes instance for an image. ...

Causes the image to be scaled while it is loaded. ...

Queries the gdk-pixbuf:pixbuf object that a pixbuf loader is currently creating. ...

Queries the gdk-pixbuf:pixbuf-animation object that a pixbuf loader is currently creating. ...

Informs a pixbuf loader that no further writes with the gdk-pixbuf:pixbuf-loader-write function will occur, so that it can free its internal loading structures. ...

Animations


GdkPixbufAnimationIter

An opaque object representing an iterator which points to a certain position in an animation. ...

Gets the current pixbuf which should be displayed. ...

Gets the number of milliseconds the current pixbuf should be displayed, or -1 if the current pixbuf should be displayed forever. ...

Possibly advances an animation to a new frame. ...

Used to determine how to respond to the "area-updated" signal on the gdk-pixbuf:pixbuf-loader object when loading an animation. ...


GdkPixbufAnimation

The GdkPixbuf library provides a simple mechanism to load and represent animations. ...

Creates a new animation by loading it from a file. ...

Creates a new pixbuf animation by loading an image from an resource. ...

Queries the width of the bounding box of a pixbuf animation. ...

Queries the width of the bounding box of a pixbuf animation. ...

Get an iterator for displaying an animation. ...

If you load a file with the gdk-pixbuf:pixbuf-animation-new-from-file function and it turns out to be a plain, unanimated image, then this function will return true. ...

If an animation is really just a plain image, has only one frame, this function returns that image. ...


GdkPixbufSimpleAnim

An opaque structure representing a simple animation. ...

The accessor for the loop slot gets or sets whether the animation should loop when it reaches the end. ...

Creates a new, empty animation. ...

Adds a new frame to animation. ...

Exported Symbol Index

+major-version+, Constant
+micro-version+, Constant
+minor-version+, Constant
+version+, Constant
colorspace, GEnum
pixbuf, Class
pixbuf-add-alpha, Function
pixbuf-animation, Class
pixbuf-animation-height, Function
pixbuf-animation-is-static-image, Function
pixbuf-animation-iter, Function
pixbuf-animation-iter, Class
pixbuf-animation-iter-advance, Function
pixbuf-animation-iter-delay-time, Function
pixbuf-animation-iter-on-currently-loading-frame, Function
pixbuf-animation-iter-pixbuf, Function
pixbuf-animation-new-from-file, Function
pixbuf-animation-new-from-resource, Function
pixbuf-animation-static-image, Function
pixbuf-animation-width, Function
pixbuf-apply-embedded-orientation, Function
pixbuf-bits-per-sample, Accessor
pixbuf-byte-length, Function
pixbuf-colorspace, Accessor
pixbuf-composite, Function
pixbuf-composite-color, Function
pixbuf-composite-color-simple, Function
pixbuf-copy, Function
pixbuf-copy-area, Function
pixbuf-copy-options, Function
pixbuf-file-info, Function
pixbuf-file-info-async, Function
pixbuf-file-info-finish, Function
pixbuf-fill, Function
pixbuf-flip, Function
pixbuf-format, CStruct
pixbuf-format-description, Function
pixbuf-format-extensions, Function
pixbuf-format-is-disabled, Function
pixbuf-format-is-save-option-supported, Function
pixbuf-format-is-scalable, Function
pixbuf-format-is-writable, Function
pixbuf-format-license, Function
pixbuf-format-mime-types, Function
pixbuf-format-name, Function
pixbuf-format-set-disabled, Function
pixbuf-formats, Function
pixbuf-has-alpha, Accessor
pixbuf-height, Accessor
pixbuf-interp-type, GEnum
pixbuf-loader, Class
pixbuf-loader-animation, Function
pixbuf-loader-close, Function
pixbuf-loader-format, Function
pixbuf-loader-new, Function
pixbuf-loader-new-with-mime-type, Function
pixbuf-loader-new-with-type, Function
pixbuf-loader-pixbuf, Function
pixbuf-loader-set-size, Function
pixbuf-loader-write, Function
pixbuf-loader-write-bytes, Function
pixbuf-n-channels, Accessor
pixbuf-new, Function
pixbuf-new-from-bytes, Function
pixbuf-new-from-file, Function
pixbuf-new-from-file-at-scale, Function
pixbuf-new-from-file-at-size, Function
pixbuf-new-from-resource, Function
pixbuf-new-from-resource-at-scale, Function
pixbuf-new-subpixbuf, Function
pixbuf-option, Function
pixbuf-pixel-bytes, Accessor
pixbuf-pixels, Accessor
pixbuf-read-pixels, Function
pixbuf-remove-option, Function
pixbuf-rotate-simple, Function
pixbuf-rotation, GEnum
pixbuf-rowstride, Accessor
pixbuf-saturate-and-pixelate, Function
pixbuf-save, Function
pixbuf-scale, Function
pixbuf-scale-simple, Function
pixbuf-simple-anim, Class
pixbuf-simple-anim-add-frame, Function
pixbuf-simple-anim-loop, Accessor
pixbuf-simple-anim-new, Function
pixbuf-width, Accessor
version-string, Function