summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2008-07-15 20:35:48 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-07-15 20:35:48 +0000
commitac37e86c00ee08470ae9836c9aac725cf296355c (patch)
tree17a497ddd7e26b5114d0c258a48af12286077742 /gdk-pixbuf
parentb8fcd8f5acc0baf7005ee897341caef1278e1f19 (diff)
downloadgdk-pixbuf-ac37e86c00ee08470ae9836c9aac725cf296355c.tar.gz
Use gdk_pixbuf_copy_area() to copy between pixbufs. Reported by Andrey
* gdk-pixbuf-utils.c (gdk_pixbuf_saturate_and_pixelate): Use gdk_pixbuf_copy_area() to copy between pixbufs. Reported by Andrey Tsyvarev svn path=/trunk/; revision=20840
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-util.c b/gdk-pixbuf/gdk-pixbuf-util.c
index 53e32403b..f682aec9b 100644
--- a/gdk-pixbuf/gdk-pixbuf-util.c
+++ b/gdk-pixbuf/gdk-pixbuf-util.c
@@ -190,9 +190,10 @@ gdk_pixbuf_saturate_and_pixelate(const GdkPixbuf *src,
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;