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);