Make fg image smaller

This commit is contained in:
Joey Hines 2025-04-17 21:37:35 -06:00
parent 61bbec5aa6
commit d71b4bd986
Signed by: joeyahines
GPG Key ID: 38BA6F25C94C9382

View File

@ -59,10 +59,14 @@ pub async fn create_greenscreen_image(
(1.0, 1.0)
};
foreground_wand.scale_image(scale_width, scale_height, FilterType::Lanczos2)?;
foreground_wand.scale_image(
scale_width * 0.75,
scale_height * 0.75,
FilterType::Lanczos2,
)?;
let pos_x = background_width / 2 - foreground_wand.get_image_width() / 2;
let pos_y = background_height / 2 - foreground_wand.get_image_height() / 2;
let pos_y = background_height - foreground_wand.get_image_height();
background_wand.compose_images(
&foreground_wand,
CompositeOperator::Atop,