summaryrefslogtreecommitdiff
path: root/src/lib/image.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-12-30 01:47:26 +0000
committerCarl Hetherington <cth@carlh.net>2017-12-30 01:47:26 +0000
commite565ceeea3d842373d97ee21d99775ac1dd1269e (patch)
treecd3bd18f014801c85e1c670b2d316f5871106731 /src/lib/image.cc
parentca545930f35fde9f60f76a6d66de475da5cb098c (diff)
Add missing factor to fix problems when padding in subsampled containers; should fix #1129.
Diffstat (limited to 'src/lib/image.cc')
-rw-r--r--src/lib/image.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index 92c1ab9a2..a6354f2d1 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -205,7 +205,7 @@ Image::crop_scale_window (
uint8_t* scale_out_data[out->planes()];
for (int c = 0; c < out->planes(); ++c) {
- scale_out_data[c] = out->data()[c] + lrintf (out->bytes_per_pixel(c) * corner.x) + out->stride()[c] * corner.y;
+ scale_out_data[c] = out->data()[c] + lrintf (out->bytes_per_pixel(c) * corner.x) + out->stride()[c] * (corner.y / out->vertical_factor(c));
}
sws_scale (