From 024d0e9a8b54cab167ea11c90515ade4911c93a4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Aug 2012 12:56:36 +0100 Subject: Slightly hacky fix for negative padding in Scope, causing corrupt images. --- src/lib/format.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/format.cc b/src/lib/format.cc index dcc884412..d99ed926a 100644 --- a/src/lib/format.cc +++ b/src/lib/format.cc @@ -185,5 +185,12 @@ Format::all () int Format::dcp_padding () const { - return rint ((_dcp_size.width - (_dcp_size.height * _ratio / 100.0)) / 2.0); + int p = rint ((_dcp_size.width - (_dcp_size.height * _ratio / 100.0)) / 2.0); + + /* This comes out -ve for Scope; bodge it */ + if (p < 0) { + p = 0; + } + + return p; } -- cgit v1.2.3