From 751ce0a89e747f595f4bb42a426f36332f7739ef Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Sun, 25 Dec 2005 16:49:47 +0000 Subject: [PATCH] Don't generate thumbnails with alpha. See bug #324077. Thanks to Jeroen * djvu/djvu-document.c: (djvu_document_thumbnails_get_thumbnail): * dvi/pixbuf-device.c: (dvi_pixbuf_create_image), (mdvi_pixbuf_device_render): * pdf/ev-poppler.cc: Don't generate thumbnails with alpha. See bug #324077. Thanks to Jeroen Zwartepoorte . --- ChangeLog | 10 ++++++++++ djvu/djvu-document.c | 2 +- dvi/pixbuf-device.c | 4 ++-- pdf/ev-poppler.cc | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index afe17d7d..91448fb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-12-25 Nickolay V. Shmyrev + + * djvu/djvu-document.c: (djvu_document_thumbnails_get_thumbnail): + * dvi/pixbuf-device.c: (dvi_pixbuf_create_image), + (mdvi_pixbuf_device_render): + * pdf/ev-poppler.cc: + + Don't generate thumbnails with alpha. See bug #324077. + Thanks to Jeroen Zwartepoorte . + 2005-12-25 Nickolay V. Shmyrev * shell/ev-window.c: (setup_chrome_from_metadata): diff --git a/djvu/djvu-document.c b/djvu/djvu-document.c index 38147875..8819e734 100644 --- a/djvu/djvu-document.c +++ b/djvu/djvu-document.c @@ -293,7 +293,7 @@ djvu_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, djvu_document_thumbnails_get_dimensions (document, page, width, &thumb_width, &thumb_height); - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, thumb_width, thumb_height); gdk_pixbuf_fill (pixbuf, 0xffffffff); pixels = gdk_pixbuf_get_pixels (pixbuf); diff --git a/dvi/pixbuf-device.c b/dvi/pixbuf-device.c index 6175e471..1a81c011 100644 --- a/dvi/pixbuf-device.c +++ b/dvi/pixbuf-device.c @@ -128,7 +128,7 @@ static int dvi_pixbuf_interpolate_colors(void *device_data, static void *dvi_pixbuf_create_image(void *device_data, Uint w, Uint h, Uint bpp) { - return gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h); + return gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, w, h); return NULL; } @@ -207,7 +207,7 @@ mdvi_pixbuf_device_render (DviContext * dvi) page_width = dvi->dvi_page_w * dvi->params.conv + 2 * c_device->xmargin; page_height = dvi->dvi_page_h * dvi->params.vconv + 2 * c_device->ymargin; - c_device->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, page_width, page_height); + c_device->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, page_width, page_height); gdk_pixbuf_fill (c_device->pixbuf, 0xffffffff); mdvi_dopage (dvi, dvi->currpage); diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index 417e1aed..4fb1d9a2 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -910,7 +910,7 @@ make_thumbnail_for_size (PdfDocument *pdf_document, height = temp; } - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height); gdk_pixbuf_fill (pixbuf, 0xffffffff); -- 2.43.5