add: include ImageFormat
This commit is contained in:
parent
7607c8079d
commit
0dcc94b7cf
4 changed files with 5 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -171,7 +171,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "axum-image"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-extra",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "axum-image"
|
||||
description = "Image extractors for Axum"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2024"
|
||||
authors = ["trisuaso"]
|
||||
repository = "https://trisua.com/t/axum-image"
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::{fs::File, io::BufWriter};
|
|||
pub fn save_image_buffer(
|
||||
path: &str,
|
||||
bytes: Vec<u8>,
|
||||
format: image::ImageFormat,
|
||||
format: crate::ImageFormat,
|
||||
) -> std::io::Result<()> {
|
||||
let pre_img_buffer = match image::load_from_memory(&bytes) {
|
||||
Ok(i) => i,
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
pub mod encode;
|
||||
pub mod extract;
|
||||
|
||||
pub use image::ImageFormat;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue