]> Pileus Git - ~andy/gtk/blobdiff - gdk-pixbuf/gdk-pixbuf-util.c
[quartz] Delete the typedef of GdkDevicePrivate
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-util.c
index 1b0de51f355037121969101a1e20ef9a461dab69..58ee842cc7f4791d8c8e2b470f5885ac2250044f 100644 (file)
@@ -21,7 +21,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <config.h>
+#include "config.h"
 #include "gdk-pixbuf-private.h"
 #include "gdk-pixbuf-alias.h"
 #include <string.h>
@@ -55,7 +55,7 @@ gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf,
        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);
@@ -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;
@@ -266,7 +267,7 @@ gdk_pixbuf_saturate_and_pixelate(const GdkPixbuf *src,
  * Return value: A newly-created pixbuf, or a reference to the
  * input pixbuf (with an increased reference count).
  *
- * Since 2.12
+ * Since: 2.12
  **/
 GdkPixbuf *
 gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src)
@@ -276,7 +277,7 @@ gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src)
        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");