diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-08-11 16:39:03 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-08-11 16:39:03 +0200 |
| commit | f2b10879dcafccdb28f88d53dc1fc22094b96c1d (patch) | |
| tree | 3dac7b17186aa21b487eb9580432bffcbae4270a | |
| parent | d4d9f1b9213cf6e95e840009488d84ad4a24b21b (diff) | |
Fix d881836379172f4072ed81ea074f46b3a363a681 which removed clearing
of the left-hand-side of images.
| -rw-r--r-- | src/lib/image.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index 629fc0a64..5866ee5b4 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -298,9 +298,11 @@ Image::crop_scale_window ( * 2. When we are scaling to certain sizes and placing the result into a larger * black frame. * - * Clear out the left hand side of the image to take care of that. + * Clear out the sides of the image to take care of those cases. */ - out->make_part_black (corner.x + inter_size.width, (out_size.width - inter_size.width) / 2); + auto const pad = (out_size.width - inter_size.width) / 2; + out->make_part_black(0, pad); + out->make_part_black(corner.x + inter_size.width, pad); if ( video_range == VideoRange::VIDEO && |
