Fixed an issue where the artefacts were appearing around the edges of the bounding box despite the "black_outside" flag being turned on.
An additional result of this fix is that the distorted image is no longer clipped slightly around the edges.