projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05feb78
)
Slightly hacky fix for negative padding in Scope, causing corrupt images.
author
Carl Hetherington
<cth@carlh.net>
Thu, 9 Aug 2012 11:56:36 +0000
(12:56 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 9 Aug 2012 11:56:36 +0000
(12:56 +0100)
src/lib/format.cc
patch
|
blob
|
history
diff --git
a/src/lib/format.cc
b/src/lib/format.cc
index dcc884412487a6e2fb80fef205ac949c671e37cb..d99ed926a2ac42df20ed7216c716bb9a91256ddd 100644
(file)
--- 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;
}