diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2007-08-17 20:11:32 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2007-08-17 20:11:32 (GMT) |
commit | f636661bcd189fefca5dad99deca9088d4a4b317 (patch) | |
tree | 0c75cd7834f8515a9ca03e8ceb7810cd146dd183 /backend | |
parent | 2fa6fd8b701a2516de3a66df3d63677a01e115be (diff) |
Fix thumbnails rotation in pdf documents that include embedded thumbnails.
2007-08-17 Carlos Garcia Campos <carlosgc@gnome.org>
* backend/pdf/ev-poppler.cc:
(pdf_document_thumbnails_get_thumbnail):
Fix thumbnails rotation in pdf documents that include embedded
thumbnails.
svn path=/trunk/; revision=2629
Diffstat (limited to 'backend')
-rw-r--r-- | backend/pdf/ev-poppler.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 8455411..38a01fd 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -1293,7 +1293,15 @@ pdf_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document_thumbnails g_return_val_if_fail (poppler_page != NULL, NULL); pixbuf = poppler_page_get_thumbnail (poppler_page); - if (!pixbuf) { + if (pixbuf) { + /* Rotate provided thumbnail if needed */ + GdkPixbuf *rotated_pixbuf; + + rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, + (GdkPixbufRotation) (360 - rc->rotation)); + g_object_unref (pixbuf); + pixbuf = rotated_pixbuf; + } else { /* There is no provided thumbnail. We need to make one. */ pixbuf = make_thumbnail_for_page (pdf_document, poppler_page, rc); } |