mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-26 19:46:58 -06:00
Export: record slide resolution in PNG and JPEG pictures
A default export is 2 pixels per point. Without a resolution, Preview treats those pixels as 72 dpi and the picture opens at twice the slide's size. PNG pHYs and JPEG JFIF density now say scale times 72, so the default is 144 dpi. Screenshots stay untagged. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -232,7 +232,7 @@ fn render_transition(args: &[String]) -> Result<(), String> {
|
||||
let name = format!("{stem}-t{t:.3}.png");
|
||||
p.with_file_name(name).to_string_lossy().into_owned()
|
||||
};
|
||||
std::fs::write(&path, img.to_png()).map_err(|e| format!("{path}: {e}"))?;
|
||||
std::fs::write(&path, img.to_png_at(render::dpi_for_scale(opts.scale))).map_err(|e| format!("{path}: {e}"))?;
|
||||
outln!("{path} ({}×{}) {} {} t={t}", img.width, img.height, tr.kind, tr.option);
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user