All pastes #414082 Raw Edit

Untitled

public c v1 · immutable
#414082 ·published 2007-03-28 20:57 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;	GOptionEntry entries[]=	{		{"alpha", 'A', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_NONE, &has_alpha, "fond transparent", NULL},		{"width", 'W', 0, G_OPTION_ARG_INT, &width, "width", NULL},		{"height", 'h', 0, G_OPTION_ARG_INT, &height, "height", 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;	bits_per_sample = 8;	//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);}