16#include <gdk-pixbuf/gdk-pixbuf.h>
27static gboolean
writer(
const char *buf, gsize count, GError **
error,
35 char *
const format_strs[] = {
43 assert(job->
device.
id < (
int)(
sizeof(format_strs) /
sizeof(format_strs[0])));
44 char *
const format_str = format_strs[job->
device.
id];
50 assert(job->
height <= INT_MAX &&
"height out of range");
52 pixbuf = gdk_pixbuf_new_from_data(
69 gdk_pixbuf_save_to_callback(pixbuf,
writer, job, format_str,
NULL,
"x-dpi",
75 g_object_unref(pixbuf);
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
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