Re: Gdk Pixbuf file saving




Hi!


On Tue, 30 Aug 2005 17:45:53 +1000
Nick Watts <fatalglory gmail com> wrote:

I am trying to create a simple photo resizing app and I can't get the 
gdk_pixbuf_save() function to work.
I have gdk_pixbuf_scale_simple() working so I evidently have the gdk

Here is my code:

==========================================================================
static void save_image()
{
GdkPixbuf *savepixbuf;
savepixbuf = gtk_image_get_pixbuf(GTK_IMAGE(img));
GError *error;

// you should set here error to NULL
  error = NULL;

gdk_pixbuf_save(savepixbuf, filename, "jpeg", &error, "quality", "100", 
NULL);
}

GtkWidget *img;
img = gtk_image_new_from_file("somephoto.jpg");
==========================================================================

Compiles fine but upon attempting to save the file the GError returns thus:

message: \x08\x7f\xfc
code: 6770465
domain: G_FILE_ERROR

I can't figure out what's causing the error, if it's my code or if it is 
something OS related (using win32 and GTK+ 2.6).

Any help much appreciated,
-Nick
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 
HuamiSoft Hubert Sokolowski
http://www.huamisoft.com/
tel. 501456743



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]