All pastes #414001 Raw Edit

Stuff

public c v1 · immutable
#414001 ·published 2007-03-28 20:21 UTC
rendered paste body
#include <libgnome/libgnome.h>#include <libgnomeui/libgnomeui.h>#include <libgnomevfs/gnome-vfs.h>#include <libgnomevfs/gnome-vfs-mime.h>#include <stdio.h>#include <glib/gprintf.h>intmain (int argc, char **argv){	GOptionContext *context = NULL;	GdkPixbuf *pixbuf = NULL;	const char *filename = NULL;	const char *type = NULL;	GdkColorspace colorspace;	gboolean has_alpha;	int bits_per_sample;	int width;	int height;	const GOptionEntry entries[]=	{		{"alpha", "a", G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_NONE, &has_alpha, "fond transparent", NULL}  };	context = g_option_context_new("Pelemele");	g_option_context_add_main_entries(context, entries, NULL);	gnome_program_init("pelemele", "0.0.1", LIBGNOMEUI_MODULE, argc, argv, GNOME_PARAM_GOPTION_CONTEXT, context, GNOME_PARAM_NONE);	colorspace = GDK_COLORSPACE_RGB;	pixbuf = gdk_pixbuf_new(colorspace, has_alpha, bits_per_sample, width, height);	gdk_pixbuf_save(pixbuf, filename, type, NULL, NULL);	g_option_context_free(context);}