X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libdocument%2Fev-document-misc.c;h=133a6c6acce732e756f1ceaae248a41e17bd716b;hb=f0b7075e647626890908db0d630d88a4e4f779b5;hp=7bc793cbf02b772759acbe85100d4a08cdeeded8;hpb=1af6600934d1f723e5b492b8322e52a1144fb0af;p=evince.git diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c index 7bc793cb..133a6c6a 100644 --- a/libdocument/ev-document-misc.c +++ b/libdocument/ev-document-misc.c @@ -152,8 +152,9 @@ ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf) { cairo_surface_t *surface; cairo_t *cr; - - surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, + + surface = cairo_image_surface_create (gdk_pixbuf_get_has_alpha (pixbuf) ? + CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf)); cr = cairo_create (surface);