Description Methods and Functions Hierarchy Detailed Description Structures Convenient Construction Enums and Flags Properties Author(s) References
Information that describes an image.
gdkPixbufGetColorspace(object)
gdkPixbufGetNChannels(object)
gdkPixbufGetHasAlpha(object)
gdkPixbufGetBitsPerSample(object)
gdkPixbufGetPixels(object)
gdkPixbufGetWidth(object)
gdkPixbufGetHeight(object)
gdkPixbufGetRowstride(object)
gdkPixbufGetOption(object, key)
gdkPixbuf(width = -1, height = -1, filename, colorspace, has.alpha, bits.per.sample, preserve.aspect.ratio = 1, data, stream, cancellable = NULL, rowstride, .errwarn = TRUE)
1 2 |
The GdkPixbuf
structure contains
information that describes an image in memory.
GdkPixbuf
This is the main structure in the gdk-pixbuf
library. It is
used to represent images. 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).
gdkPixbuf
is the result of collapsing the constructors of GdkPixbuf
(gdkPixbufNew
, gdkPixbufNewFromFile
, gdkPixbufNewFromFileAtSize
, gdkPixbufNewFromFileAtScale
, gdkPixbufNewFromData
, gdkPixbufNewFromXpmData
, NULL, gdkPixbufNewFromStream
, gdkPixbufNewFromStreamAtScale
) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.
GdkPixbufError
An error code in the GDK_PIXBUF_ERROR
domain. Many gdk-pixbuf
operations can cause errors in this domain, or in the G_FILE_ERROR
domain.
corrupt-image
An image file was broken somehow.
insufficient-memory
Not enough memory.
bad-option-value
A bad option was passed to a pixbuf save module.
unknown-type
Unknown image type.
unsupported-operation
Don't know how to perform the given operation on the type of image at hand.
failed
Generic failure code, something went wrong.
GdkColorspace
This enumeration defines the color spaces that are supported by
the gdk-pixbuf
library. Currently only RGB is supported.
b
Indicates a red/green/blue additive color space.
GdkPixbufAlphaMode
These values can be passed to
gdkPixbufRenderToDrawableAlpha
to control how the alpha
channel of an image should be handled. This function can create a
bilevel clipping mask (black and white) and use it while painting
the image. In the future, when the X Window System gets an alpha
channel extension, it will be possible to do full alpha
compositing onto arbitrary drawables. For now both cases fall
back to a bilevel clipping mask.
bilevel
A bilevel clipping mask (black and white) will be created and used to draw the image. Pixels below 0.5 opacity will be considered fully transparent, and all others will be considered fully opaque.
full
For now falls back to GDK_PIXBUF_ALPHA_BILEVEL
.
In the future it will do full alpha compositing.
bits-per-sample
[integer : Read / Write / Construct Only]The number of bits per sample. Currently only 8 bit per sample are supported. Allowed values: [1,16] Default value: 8
colorspace
[GdkColorspace
: Read / Write / Construct Only]The colorspace in which the samples are interpreted. Default value: GDK_COLORSPACE_RGB
has-alpha
[logical : Read / Write / Construct Only]Whether the pixbuf has an alpha channel. Default value: FALSE
height
[integer : Read / Write / Construct Only]The number of rows of the pixbuf. Allowed values: >= 1 Default value: 1
n-channels
[integer : Read / Write / Construct Only]The number of samples per pixel. Currently, only 3 or 4 samples per pixel are supported. Allowed values: >= 0 Default value: 3
pixels
[R object : Read / Write / Construct Only]A pointer to the pixel data of the pixbuf.
rowstride
[integer : Read / Write / Construct Only]The number of bytes between the start of a row and the start of the next row. This number must (obviously) be at least as large as the width of the pixbuf. Allowed values: >= 1 Default value: 1
width
[integer : Read / Write / Construct Only]The number of columns of the pixbuf. Allowed values: >= 1 Default value: 1
Derived by RGtkGen from GTK+ documentation
https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-The-GdkPixbuf-Structure.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.