Struct
GdkPixdataPixdata
Description [src]
struct GdkPixdata {
guint32 magic;
gint32 length;
guint32 pixdata_type;
guint32 rowstride;
guint32 width;
guint32 height;
guint8* pixel_data;
}
A pixel buffer suitable for serialization and streaming.
Using GdkPixdata
, images can be compiled into an application,
making it unnecessary to refer to external image files at runtime.
GdkPixbuf
includes a utility named gdk-pixbuf-csource
, which
can be used to convert image files into GdkPixdata
structures suitable
for inclusion in C sources. To convert the GdkPixdata
structures back
into a GdkPixbuf
, use gdk_pixbuf_from_pixdata()
.
Structure members
magic |
Magic number. A valid |
length |
Less than 1 to disable length checks, otherwise
|
pixdata_type |
Information about colorspace, sample width and
encoding, in a |
rowstride |
Distance in bytes between rows. |
width |
Width of the image in pixels. |
height |
Height of the image in pixels. |
pixel_data |
|
Deprecated since: | 2.32 |
|
Instance methods
gdk_pixdata_deserialize
Deserializes (reconstruct) a GdkPixdata
structure from a byte stream.
Deprecated since: 2.32
gdk_pixdata_serialize
Serializes a GdkPixdata
structure into a byte stream.
The byte stream consists of a straightforward writeout of the
GdkPixdata
fields in network byte order, plus the pixel_data
bytes the structure points to.
Deprecated since: 2.32
gdk_pixdata_to_csource
Generates C source code suitable for compiling images directly into programs.
Deprecated since: 2.32