16#include <gdk-pixbuf/gdk-pixbuf.h>
26static gboolean
writer(
const char *buf, gsize count, GError **
error,
34 char *
const format_strs[] = {
42 assert(job->
device.
id <
sizeof(format_strs) /
sizeof(format_strs[0]));
43 char *
const format_str = format_strs[job->
device.
id];
49 assert(job->
height <= INT_MAX &&
"height out of range");
51 pixbuf = gdk_pixbuf_new_from_data(
63 gdk_pixbuf_save_to_callback(pixbuf,
writer, job, format_str,
NULL,
NULL);
65 g_object_unref(pixbuf);
Arithmetic helper functions.
static void argb2rgba(size_t width, size_t height, unsigned char *data)
#define GVDEVICE_DOES_TRUECOLOR
#define GVDEVICE_BINARY_FORMAT
size_t gvwrite(GVJ_t *job, const char *s, size_t len)
static gvdevice_engine_t gdk_engine
static gvdevice_features_t device_features_gdk
gvplugin_installed_t gvdevice_gdk_types[]
static gboolean writer(const char *buf, gsize count, GError **error, void *data)
static void gdk_format(GVJ_t *job)
gvplugin_active_device_t device
unsigned char * imagedata
location of imagedata