From: Ian Jackson Date: Sat, 22 May 2021 21:33:24 +0000 (+0100) Subject: bundles: Make Base64Meta sizes be f64 X-Git-Tag: otter-0.6.0~56 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9fca29e0fed480f5fc9b5f609dab3f899284606d;p=otter.git bundles: Make Base64Meta sizes be f64 We'll want this in a moment. Signed-off-by: Ian Jackson --- 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)?; }