From: Carlos Garcia Campos Date: Wed, 20 May 2009 18:20:30 +0000 (+0200) Subject: [pdf] Fix double to int conversion in thumbnails_get_dimensions X-Git-Tag: EVINCE_2_27_3~70 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=d8e314a2f10f0fb949f4da48042d12dbdb5383b4;p=evince.git [pdf] Fix double to int conversion in thumbnails_get_dimensions Fixes bgo#581524. --- diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 24d002e0..f6bce098 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -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;