diff options
author | Federico Mena Quintero <federico@redhat.com> | 1999-10-27 23:36:44 +0000 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-10-27 23:36:44 +0000 |
commit | 0eb096334e73642bb9b274289b7916ea00298d3a (patch) | |
tree | 9fa815ac4506d13e1f59330ed4890984ae54f491 /gdk-pixbuf/io-png.c | |
parent | 3176b6b3eaec9912067a00286dbf2da8881d8dc3 (diff) | |
download | gtk+-0eb096334e73642bb9b274289b7916ea00298d3a.tar.gz |
New function to threshold a pixbuf's alpha channel into a bitmap.
1999-10-27 Federico Mena Quintero <federico@redhat.com>
* src/gdk-pixbuf-render.c (gdk_pixbuf_render_threshold_alpha): New
function to threshold a pixbuf's alpha channel into a bitmap.
* src/gdk-pixbuf.c (gdk_pixbuf_new): Fixed so that it will
contemplate future extensions to ArtPixBuf's formats.
* src/io-png.c (png_info_callback): Use the new API of gdk_pixbuf_new().
* src/gdk-pixbuf.h (gdk_pixbuf_get_height): Added some convenience
macros to fetch the ArtPixBuf's fields.
Diffstat (limited to 'gdk-pixbuf/io-png.c')
-rw-r--r-- | gdk-pixbuf/io-png.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c index c6a8289c3e..6dacef8f48 100644 --- a/gdk-pixbuf/io-png.c +++ b/gdk-pixbuf/io-png.c @@ -153,7 +153,7 @@ image_load (FILE *f) png_structp png_ptr; png_infop info_ptr, end_info; gboolean failed = FALSE; - gint i, depth, ctype, inttype, passes, bpp; + gint i, ctype, bpp; png_uint_32 w, h; png_bytepp rows; guchar *pixels; @@ -360,7 +360,7 @@ png_info_callback (png_structp png_read_ptr, if (color_type & PNG_COLOR_MASK_ALPHA) have_alpha = TRUE; - lc->pixbuf = gdk_pixbuf_new(have_alpha, width, height); + lc->pixbuf = gdk_pixbuf_new(ART_PIX_RGB, have_alpha, 8, width, height); if (lc->pixbuf == NULL) { /* Failed to allocate memory */ |