* Boston, MA 02111-1307, USA.
*/
-#include <config.h>
+#include "config.h"
#include "gdk-pixbuf-private.h"
#include "gdk-pixbuf-alias.h"
#include <string.h>
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;
* 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)
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");