pub fn render_to_png(html: &str, config: Config) -> Result<Vec<u8>>Expand description
Render HTML content to PNG format.
Convenience function that renders directly to PNG without needing to specify the format in the config.
ยงExample
use hyper_render::{render_to_png, Config};
let png_bytes = render_to_png("<h1>Hello</h1>", Config::default())?;
std::fs::write("output.png", png_bytes)?;