Hopefully get rid of spurious black lines around preview.
authorCarl Hetherington <cth@carlh.net>
Sun, 10 Nov 2013 17:14:43 +0000 (17:14 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 10 Nov 2013 17:14:43 +0000 (17:14 +0000)
ChangeLog
src/lib/util.cc

index 851a85b520443d4df8898b851277b2bf631b4538..c48bdb89bf0f1b538e1aa7419dcc0dfeec081a61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-10  Carl Hetherington  <cth@carlh.net>
+
+       * Hopefully get rid of spurious black lines around
+       preview.
+
 2013-11-08  Carl Hetherington  <carl@ubuntu>
 
        * Fix strange behaviour of J2K bandwidth control
index e2ce94dd9ea8f75eaf84a4841afe17298a99c211..484c4fb9ba012edb895b0c466f484af2028bd2d8 100644 (file)
@@ -930,8 +930,8 @@ libdcp::Size
 fit_ratio_within (float ratio, libdcp::Size full_frame)
 {
        if (ratio < full_frame.ratio ()) {
-               return libdcp::Size (full_frame.height * ratio, full_frame.height);
+               return libdcp::Size (rint (full_frame.height * ratio), full_frame.height);
        }
        
-       return libdcp::Size (full_frame.width, full_frame.width / ratio);
+       return libdcp::Size (full_frame.width, rint (full_frame.width / ratio));
 }