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.
This commit is contained in:
committed by
Arturo Espinosa
parent
3176b6b3ea
commit
0eb096334e
@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user