]> www.fi.muni.cz Git - evince.git/commitdiff
[pdf] Fix double to int conversion in thumbnails_get_dimensions
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 20 May 2009 18:20:30 +0000 (20:20 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 20 May 2009 18:20:30 +0000 (20:20 +0200)
Fixes bgo#581524.

backend/pdf/ev-poppler.cc

index 24d002e079e4020d363886d8abef0062e71abc64..f6bce0988839031f2ef2aab81e4f3b9692fe45dd 100644 (file)
@@ -1479,9 +1479,9 @@ pdf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document_thumbnail
        poppler_page_get_size (POPPLER_PAGE (rc->page->backend_page),
                               &page_width, &page_height);
        
-       *width = (gint) MAX (page_width * rc->scale, 1);
-       *height = (gint) MAX (page_height * rc->scale, 1);
-       
+       *width = MAX ((gint)(page_width * rc->scale + 0.5), 1);
+       *height = MAX ((gint)(page_height * rc->scale + 0.5), 1);
+
        if (rc->rotation == 90 || rc->rotation == 270) {
                gint  temp;