From 9fca29e0fed480f5fc9b5f609dab3f899284606d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 22 May 2021 22:33:24 +0100 Subject: [PATCH] bundles: Make Base64Meta sizes be f64 We'll want this in a moment. Signed-off-by: Ian Jackson --- src/bundles.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bundles.rs b/src/bundles.rs index 52b2f5be..e6ae0932 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -718,8 +718,8 @@ enum PictureFormat { #[derive(Serialize,Copy,Clone,Debug)] struct Base64Meta { - width: u32, - height: u32, + width: f64, + height: f64, ctype: &'static str, } @@ -733,7 +733,11 @@ fn image_usvg(zfname: &str, input: File, output: File, |e| LE::BadBundle(format!("{}: image examination failed: {}", zfname, e)))?; - let render = Base64Meta { width, height, ctype }; + let render = Base64Meta { + width: width.into(), + height: height.into(), + ctype, + }; base64_usvg(zfname, input, output, &render)?; } -- 2.30.2