diff options
author | Martin Kretzschmar <martink@src.gnome.org> | 2005-01-21 00:58:12 (GMT) |
---|---|---|
committer | Martin Kretzschmar <martink@src.gnome.org> | 2005-01-21 00:58:12 (GMT) |
commit | 40ea9bf598e586f430db71fc87841184cfafc929 (patch) | |
tree | 0b0f29b4b72ad6396480a23ea5bd694070ceb20b | |
parent | c157a03628e9f42e882b8bf155b3560de8b4d620 (diff) |
(pixbuf_document_thumbnails_get_dimensions): force floating point
division to calculate page_ratio. Fixes crash with landscape format
pixbufs.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | pixbuf/pixbuf-document.c | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2005-01-21 Martin Kretzschmar <martink@gnome.org> + + * pixbuf/pixbuf-document.c + (pixbuf_document_thumbnails_get_dimensions): force floating point + division to calculate page_ratio. Fixes crash with landscape + format pixbufs. + Thu Jan 20 18:56:35 2005 Jonathan Blandford <jrb@redhat.com> * shell/ev-view.c (ev_view_realize): make the bg color darker. diff --git a/pixbuf/pixbuf-document.c b/pixbuf/pixbuf-document.c index cdf1310..65cef92 100644 --- a/pixbuf/pixbuf-document.c +++ b/pixbuf/pixbuf-document.c @@ -287,7 +287,7 @@ pixbuf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document, PixbufDocument *pixbuf_document = PIXBUF_DOCUMENT (document); gdouble page_ratio; - page_ratio = gdk_pixbuf_get_height (pixbuf_document->pixbuf) / + page_ratio = ((double)gdk_pixbuf_get_height (pixbuf_document->pixbuf)) / gdk_pixbuf_get_width (pixbuf_document->pixbuf); *width = suggested_width; *height = (gint) (suggested_width * page_ratio); |