summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-09 12:56:36 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-09 12:56:36 +0100
commit024d0e9a8b54cab167ea11c90515ade4911c93a4 (patch)
tree1c03656f9fdd7ac57489ef64a4958e15c6e68350 /src/lib
parent05feb78839b7bba56974e418f627c510567023d1 (diff)
Slightly hacky fix for negative padding in Scope, causing corrupt images.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/format.cc9
1 files changed, 8 insertions, 1 deletions
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;
}