pixbuf_get_alpha (GdkPixbuf * pb, RsvgFilterContext * ctx)
{
    guchar *data;
    guchar *pbdata;
    GdkPixbuf *output;

    gsize i, pbsize;

    pbsize = gdk_pixbuf_get_width (pb) * gdk_pixbuf_get_height (pb);

    output = _rsvg_pixbuf_new_cleared (GDK_COLORSPACE_RGB, 1, 8,
                                       gdk_pixbuf_get_width (pb), gdk_pixbuf_get_height (pb));

    data = gdk_pixbuf_get_pixels (output);
    pbdata = gdk_pixbuf_get_pixels (pb);

    for (i = 0; i < pbsize; i++)
        data[i * 4 + ctx->channelmap[3]] = pbdata[i * 4 + ctx->channelmap[3]];

    return output;
}
pixbuf_get_alpha (GdkPixbuf * pb, RsvgFilterContext * ctx)
{
    guchar *data;
    guchar *pbdata;
    GdkPixbuf *output;

    gsize i, pbsize;

    pbsize = gdk_pixbuf_get_width (pb) * gdk_pixbuf_get_height (pb);

    output = _rsvg_pixbuf_new_cleared (GDK_COLORSPACE_RGB, 1, 8,
                                       gdk_pixbuf_get_width (pb), gdk_pixbuf_get_height (pb));

    data = gdk_pixbuf_get_pixels (output);
    pbdata = gdk_pixbuf_get_pixels (pb);

    for (i = 0; i < pbsize; i++)
        data[i * 4 + ctx->channelmap[3]] = pbdata[i * 4 + ctx->channelmap[3]];

    return output;
}