use image::{Rgba, RgbaImage};
use typed_builder::TypedBuilder;
#[derive(TypedBuilder)]
#[builder(build_method(into = RgbaImage))]
pub struct Background {
#[builder(default=Rgba([0, 0, 0, 255]))]
color: Rgba<u8>,
#[builder(default=(1920, 1080))]
output_dimension: (u32, u32),
}
impl From<Background> for RgbaImage {
fn from(bg: Background) -> Self {
let (width, height) = bg.output_dimension;
RgbaImage::from_pixel(width, height, bg.color)
}
}