Fix d881836379172f4072ed81ea074f46b3a363a681 which removed clearing
authorCarl Hetherington <cth@carlh.net>
Thu, 11 Aug 2022 14:39:03 +0000 (16:39 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 11 Aug 2022 14:39:03 +0000 (16:39 +0200)
of the left-hand-side of images.

src/lib/image.cc

index 629fc0a64c1c1e38b26976b195d017bfab578273..5866ee5b418a82b01eec841e832a9fd0bb8db86c 100644 (file)
@@ -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 &&