Re: How can I save a PNG file from a GdkPixbuf
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Jack Chen <jacks_small_world yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: How can I save a PNG file from a GdkPixbuf
- Date: Sun, 24 Oct 2004 22:47:57 +0200
On Sun, Oct 24, 2004 at 04:15:48PM -0400, Jack Chen wrote:
> I have a problem that I hope someone can help me with. I would like to
> save a GdkPixbuf to a PNG file using either
>
> gdk_pixbuf_savev (GdkPixbuf *pixbuf,
> const char *filename,
> const char *type,
> char **option_keys,
> char **option_values,
> GError **error);
>
> or
>
> gdk_pixbuf_save (GdkPixbuf *pixbuf,
> const char *filename,
> const char *type,
> GError **error,
> ...);
>
> The problem is I don't know what those 'option...s' are for, and if I
> leave them all as NULL, the program can compile, but will crash after
> starting. I think the problem is I don't know what 'options' to specify
> for the PNG format. I can save a JEPG file no problem because there's a
> sample source code in the GdkPixbuf's reference, but there's no example
> for PNG.
http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-file-saving.html#gdk-pixbuf-save
describes them quite well and even includes an example.
Saving PNGs is the same as JPEGs.
gdk_pixbuf_save(pixbuf, "file.png", "png", NULL, NULL);
should not crash.
Yeti
--
Dynamic IP address is not a crime.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]