From 40c29264820f2cf1db0d6e2836ae827ef9a5d05c Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 5 Oct 2001 18:51:47 +0000 Subject: gdk-pixbuf/gdk-pixbuf-io.c gdk-pixbuf/gdk-pixbuf-private.h 2001-10-05 Sven Neumann * gdk-pixbuf/gdk-pixbuf-io.c * gdk-pixbuf/gdk-pixbuf-private.h * gdk-pixbuf/gdk-pixbuf.c * gdk-pixbuf/gdk-pixbuf.h * gdk-pixbuf/io-jpeg.c * gdk-pixbuf/io-png.c: changed GDK_PIXBUF_ERROR_BAD_OPTION_VALUE to GDK_PIXBUF_ERROR_BAD_OPTION to we can use it for bad keys too. Added new public API gdk_pixbuf_get_option() to retrieve key/value pairs set by an image loader. Added support for saving and reading PNG tEXt chunks in PNG images. * demos/testpixbuf-save.c * demos/testpixbuf-scale.c: simple tests for the new PNG tEXt chunk feature. * gdk-pixbuf/tmpl/gdk-pixbuf.sgml: adapt to changes in GDK_PIXBUF_ERROR enum. --- gdk-pixbuf/gdk-pixbuf-io.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gdk-pixbuf/gdk-pixbuf-io.c') diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 5558ef6574..e97036ac1c 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -731,8 +731,8 @@ gdk_pixbuf_real_save (GdkPixbuf *pixbuf, * @Varargs: list of key-value save options * * Saves pixbuf to a file in @type, which is currently "jpeg" or - * "png". If @error is set, FALSE will be returned. Possible errors include those - * in the #GDK_PIXBUF_ERROR domain and those in the #G_FILE_ERROR domain. + * "png". If @error is set, FALSE will be returned. Possible errors include + * those in the #GDK_PIXBUF_ERROR domain and those in the #G_FILE_ERROR domain. * * The variable argument list should be NULL-terminated; if not empty, * it should contain pairs of strings that modify the save @@ -743,8 +743,13 @@ gdk_pixbuf_real_save (GdkPixbuf *pixbuf, * "quality", "100", NULL); * * - * The only save parameter that currently exists is the "quality" field - * for JPEG images; its value should be in the range [0,100]. + * Currently only few parameters exist. JPEG images can be saved with a + * "quality" parameter; its value should be in the range [0,100]. + * Text chunks can be attached to PNG images by specifying parameters of + * the form "tEXt::key", where key is an ASCII string of length 1-79. + * The values are UTF-8 encoded strings. Note however that PNG text + * chunks are stored in ISO-8859-1 encoding, so you can only set texts + * that can be represented in this encoding. * * Return value: whether an error was set **/ -- cgit v1.2.1