chiark / gitweb /
bundles: Make Base64Meta sizes be f64
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 May 2021 21:33:24 +0000 (22:33 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 May 2021 21:34:00 +0000 (22:34 +0100)
We'll want this in a moment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs

index 52b2f5be77ceda2278887748e0579661ec78660e..e6ae0932915587d57c23f6ef7e516832d02c310a 100644 (file)
@@ -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)?;
 }