summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-jpeg.c
diff options
context:
space:
mode:
authorMichael Meeks <mmeeks@src.gnome.org>1999-09-22 22:30:51 +0000
committerMichael Meeks <mmeeks@src.gnome.org>1999-09-22 22:30:51 +0000
commit6c13b03a451cd34e7674b311c3ef04c019963ee1 (patch)
tree421dee569b18bcbf2c0af4c5856e275f78328b7d /gdk-pixbuf/io-jpeg.c
parent372c4d2627e4cb15a3bec51d051f4cc30afc5138 (diff)
downloadgtk+-6c13b03a451cd34e7674b311c3ef04c019963ee1.tar.gz
Add pixbuf_duplicate,
Fix 'scale' API, Add gdk_pixbuf_new, clean io modules a tad.
Diffstat (limited to 'gdk-pixbuf/io-jpeg.c')
-rw-r--r--gdk-pixbuf/io-jpeg.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index afe5baee82..aa9fa775f1 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -114,16 +114,11 @@ GdkPixBuf *image_load(FILE *f)
jpeg_destroy_decompress(&cinfo);
/* finish off, create the pixbuf */
- pixbuf = g_new(GdkPixBuf, 1);
- pixbuf->art_pixbuf = art_pixbuf_new_rgb(pixels, w, h, (w * 3));
- if (!(pixbuf->art_pixbuf)) {
- art_free(pixels);
- g_free(pixbuf);
- return NULL;
- }
- pixbuf->ref_count = 1;
- pixbuf->unref_func = NULL;
-
+ pixbuf = gdk_pixbuf_new (art_pixbuf_new_rgb (pixels, w, h, (w * 3)),
+ NULL);
+ if (!pixbuf)
+ art_free (pixels);
+
return pixbuf;
}