build(deps): update dependencies (#4268)

This commit is contained in:
Sanchith Hegde
2024-04-02 15:43:30 +05:30
committed by GitHub
parent 9cce1520e3
commit 1f0d60e64f
46 changed files with 1980 additions and 1867 deletions

View File

@ -176,15 +176,15 @@ impl QrImage {
let qrcode_image_buffer = qr_code.render::<Luma<u8>>().build();
let qrcode_dynamic_image = image::DynamicImage::ImageLuma8(qrcode_image_buffer);
let mut image_bytes = Vec::new();
let mut image_bytes = std::io::BufWriter::new(std::io::Cursor::new(Vec::new()));
// Encodes qrcode_dynamic_image and write it to image_bytes
let _ = qrcode_dynamic_image.write_to(&mut image_bytes, image::ImageOutputFormat::Png);
let _ = qrcode_dynamic_image.write_to(&mut image_bytes, image::ImageFormat::Png);
let image_data_source = format!(
"{},{}",
consts::QR_IMAGE_DATA_SOURCE_STRING,
consts::BASE64_ENGINE.encode(image_bytes)
consts::BASE64_ENGINE.encode(image_bytes.get_ref().get_ref())
);
Ok(Self {
data: image_data_source,