diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-14 20:29:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-14 20:29:20 +0100 |
| commit | 129afab72bfc026b5704c41a6bfc0f4b3a2c4033 (patch) | |
| tree | cb24e2c035f9ac8e21f307e76defcc88bf343145 /src/lib/util.cc | |
| parent | 49f9cb10018bf4ec07a60d1599cbe62d735baa23 (diff) | |
Round image line sizes up to 32. Seems to help with LHS image corruption with both crop and a post-processing filter.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 82aaf8ff5..c3dd13d7c 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -613,3 +613,10 @@ Rectangle::intersection (Rectangle const & other) const min (y + h, other.y + other.h) - ty ); } + +int +round_up (int a, int t) +{ + a += (t - 1); + return a - (a % t); +} |
