mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Actually free the temporary pixbuf data.
This commit is contained in:
parent
b97018ad7f
commit
fabf8664f8
@ -290,6 +290,13 @@ rl_encode_rgbx (guint8 *bp, /* dest buffer */
|
||||
return bp;
|
||||
}
|
||||
|
||||
/* Used as the destroy notification function for gdk_pixbuf_new() */
|
||||
static void
|
||||
free_buffer (guchar *pixels, gpointer data)
|
||||
{
|
||||
g_free (pixels);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixdata_from_pixbuf:
|
||||
* @pixdata: a #GdkPixdata to fill.
|
||||
@ -341,12 +348,12 @@ gdk_pixdata_from_pixbuf (GdkPixdata *pixdata,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
rowstride,
|
||||
NULL, NULL);
|
||||
free_buffer, NULL);
|
||||
gdk_pixbuf_copy_area (pixbuf, 0, 0, pixbuf->width, pixbuf->height,
|
||||
buf, 0, 0);
|
||||
}
|
||||
else
|
||||
buf = pixbuf;
|
||||
buf = (GdkPixbuf *)pixbuf;
|
||||
pad = rowstride;
|
||||
pad = MAX (pad, 130 + n_bytes / 127);
|
||||
data = g_new (guint8, pad + n_bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user