From: Carl Hetherington Date: Thu, 11 Aug 2022 14:39:03 +0000 (+0200) Subject: Fix d881836379172f4072ed81ea074f46b3a363a681 which removed clearing X-Git-Tag: v2.16.20~9 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=f2b10879dcafccdb28f88d53dc1fc22094b96c1d Fix d881836379172f4072ed81ea074f46b3a363a681 which removed clearing of the left-hand-side of images. --- 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 &&