From 9a747b3d4ee7b876e7ccf3f3d7d841776562e5bc Mon Sep 17 00:00:00 2001 From: ellson Date: Sun, 4 May 2008 17:13:03 +0000 Subject: [PATCH] RGB patch --- plugin/pango/gvloadimage_pango.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/pango/gvloadimage_pango.c b/plugin/pango/gvloadimage_pango.c index 101178dc8..df600afec 100644 --- a/plugin/pango/gvloadimage_pango.c +++ b/plugin/pango/gvloadimage_pango.c @@ -101,12 +101,17 @@ static void pango_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean static void pango_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled) { cairo_surface_t *surface; /* source surface */ + cairo_format_t format; FILE *out = job->output_file; int X, Y, x, y, stride; unsigned char *data, *ix, alpha, red, green, blue; surface = cairo_loadimage(job, us); - if (surface && (cairo_image_surface_get_format(surface) == CAIRO_FORMAT_ARGB32)) { + if (surface) { + format = cairo_image_surface_get_format(surface); + if ((format != CAIRO_FORMAT_ARGB32) && (format != CAIRO_FORMAT_RGB24)) + return; + X = cairo_image_surface_get_width(surface); Y = cairo_image_surface_get_height(surface); stride = cairo_image_surface_get_stride(surface); -- 2.50.0