chore: update

This commit is contained in:
huzibaca 2024-11-30 10:38:15 +08:00
parent 277ef51375
commit c0a0b82fa6
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -103,7 +103,7 @@ pub fn open_file(_: tauri::AppHandle, path: PathBuf) -> Result<()> {
Ok(()) Ok(())
} }
// 添加新的函数来处理字节数据 #[cfg(target_os = "macos")]
pub fn is_monochrome_image_from_bytes(data: &[u8]) -> anyhow::Result<bool> { pub fn is_monochrome_image_from_bytes(data: &[u8]) -> anyhow::Result<bool> {
let img = image::load_from_memory(data)?; let img = image::load_from_memory(data)?;
let rgb_img = img.to_rgb8(); let rgb_img = img.to_rgb8();