Accept unknown parameters with a warning when saving. (#405539, Daniel

2007-04-28  Matthias Clasen <mclasen@redhat.com>

        * io-png.c:
        * io-jpeg.c: Accept unknown parameters with a warning
        when saving.  (#405539, Daniel Atallah)



svn path=/trunk/; revision=17673
This commit is contained in:
Matthias Clasen 2007-04-28 14:48:22 +00:00 committed by Matthias Clasen
parent b72dfb8c4e
commit 793ed9c2c6
3 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,9 @@
2007-04-28 Matthias Clasen <mclasen@redhat.com>
* io-png.c:
* io-jpeg.c: Accept unknown parameters with a warning
when saving. (#405539, Daniel Atallah)
2007-04-25 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-simple-anim.c (gdk_pixbuf_simple_anim_add_frame):

View File

@ -952,9 +952,7 @@ real_save_jpeg (GdkPixbuf *pixbuf,
return FALSE;
}
} else {
g_warning ("Bad option name '%s' passed to JPEG saver",
*kiter);
return FALSE;
g_warning ("Unrecognized parameter (%s) passed to JPEG saver.", *kiter);
}
++kiter;
@ -970,7 +968,14 @@ real_save_jpeg (GdkPixbuf *pixbuf,
/* no image data? abort */
pixels = gdk_pixbuf_get_pixels (pixbuf);
g_return_val_if_fail (pixels != NULL, FALSE);
if (pixels == NULL) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Image contains no pixels."));
return FALSE;
}
/* Allocate a small buffer to convert image data,
* and a larger buffer if doing to_callback save.

View File

@ -860,9 +860,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
return FALSE;
}
} else {
g_warning ("Bad option name '%s' passed to PNG saver",
*kiter);
return FALSE;
g_warning ("Unrecognized parameter (%s) passed to PNG saver.", *kiter);
}
++kiter;