Make fg image smaller
This commit is contained in:
parent
61bbec5aa6
commit
d71b4bd986
@ -59,10 +59,14 @@ pub async fn create_greenscreen_image(
|
|||||||
(1.0, 1.0)
|
(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_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(
|
background_wand.compose_images(
|
||||||
&foreground_wand,
|
&foreground_wand,
|
||||||
CompositeOperator::Atop,
|
CompositeOperator::Atop,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user