如何使用锈迹中的图像箱确定图像的文件大小?
let img = image::open("imgs/2.jpg").unwrap();
let myBytes = &img.to_bytes();
//get the number of bytes?
让image
板条箱处理图像,让标准库的fs
模块处理文件系统:
let imgSize = std::fs::metadata("imgs/2.jpg").unwrap().len();
还要寻找std::fs::Metadata
struct的其他功能