GdkPixbuf *new_pixbuf;
int x, y;
- g_return_val_if_fail (pixbuf != NULL, NULL);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
g_return_val_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB, NULL);
g_return_val_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4, NULL);
g_return_val_if_fail (pixbuf->bits_per_sample == 8, NULL);
if (saturation == 1.0 && !pixelate) {
if (dest != src)
- memcpy (gdk_pixbuf_get_pixels (dest),
- gdk_pixbuf_get_pixels (src),
- gdk_pixbuf_get_height (src) * gdk_pixbuf_get_rowstride (src));
+ gdk_pixbuf_copy_area (src, 0, 0,
+ gdk_pixbuf_get_width (src),
+ gdk_pixbuf_get_height (src),
+ dest, 0, 0);
} else {
int i, j, t;
int width, height, has_alpha, src_rowstride, dest_rowstride, bytes_per_pixel;
GdkPixbuf *temp;
GdkPixbuf *dest;
- g_return_val_if_fail (src != NULL, NULL);
+ g_return_val_if_fail (GDK_IS_PIXBUF (src), NULL);
/* Read the orientation option associated with the pixbuf */
orientation_string = gdk_pixbuf_get_option (src, "orientation");