[pitivi] medialibrary: Fix the aspect/ratio of the generated thumbnails



commit 20e7678570b7b0b1d3c8ce0f84e4d5a2a2b51b66
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Oct 5 21:11:16 2016 +0200

    medialibrary: Fix the aspect/ratio of the generated thumbnails
    
    Fixes https://phabricator.freedesktop.org/T7404
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1356

 pitivi/medialibrary.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index adf9ec9..545a044 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -240,8 +240,11 @@ class AssetThumbnail(Loggable):
                     if not small_thumb:
                         small_thumb, large_thumb = self.__get_icons("video-x-generic")
                     else:
+                        width = small_thumb.props.width
+                        height = small_thumb.props.height
                         large_thumb = small_thumb.scale_simple(
-                            128, small_thumb.get_height() * 2,
+                            LARGE_THUMB_WIDTH,
+                            LARGE_THUMB_WIDTH * height / width,
                             GdkPixbuf.InterpType.BILINEAR)
         else:
             small_thumb, large_thumb = self.__get_icons("audio-x-generic")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]