Pixdata

A #GdkPixdata contains pixbuf information in a form suitable for serialization and streaming.

Constructors

this
this(GdkPixdata* gdkPixdata, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

deserialize
bool deserialize(ubyte[] stream)

Deserializes (reconstruct) a #GdkPixdata structure from 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. The @pixdata contents are reconstructed byte by byte and are checked for validity. This function may fail with %GDK_PIXBUF_ERROR_CORRUPT_IMAGE or %GDK_PIXBUF_ERROR_UNKNOWN_TYPE.

fromPixbuf
void* fromPixbuf(Pixbuf pixbuf, bool useRle)

Converts a #GdkPixbuf to a #GdkPixdata. If @use_rle is %TRUE, the pixel data is run-length encoded into newly-allocated memory and a pointer to that memory is returned.

getPixdataStruct
GdkPixdata* getPixdataStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

serialize
ubyte[] 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.

toCsource
StringG toCsource(string name, GdkPixdataDumpType dumpType)

Generates C source code suitable for compiling images directly into programs.

Variables

gdkPixdata
GdkPixdata* gdkPixdata;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta