summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-tiff.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-tiff.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-tiff.c')
-rw-r--r--gdk-pixbuf/io-tiff.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c
index dffe9ef257..1ade9ce296 100644
--- a/gdk-pixbuf/io-tiff.c
+++ b/gdk-pixbuf/io-tiff.c
@@ -87,15 +87,11 @@ GdkPixBuf *image_load(FILE * f)
_TIFFfree(rast);
TIFFClose(tiff);
- /* Return the GdkPixBuf */
- pixbuf = g_new(GdkPixBuf, 1);
- pixbuf->art_pixbuf = art_pixbuf_new_rgba(pixels, w, h, (w * 4));
+ pixbuf = gdk_pixbuf_new (art_pixbuf_new_rgba (pixels, w, h, (w * 4)),
+ NULL);
- /* Ok, I'm anal...shoot me */
- if (!(pixbuf->art_pixbuf))
- return NULL;
- pixbuf->ref_count = 1;
- pixbuf->unref_func = NULL;
+ if (!pixbuf)
+ art_free (pixels);
return pixbuf;
}