WIP: UI编辑器自动分图层切图标 #304
@@ -94,11 +94,12 @@ fn build_marked_image_blocking(
|
||||
height,
|
||||
);
|
||||
}
|
||||
image::DynamicImage::ImageRgba8(image.clone())
|
||||
let image = image::DynamicImage::ImageRgba8(image);
|
||||
image
|
||||
.save_with_format(target, image::ImageFormat::Png)
|
||||
.map_err(|e| format!("写入标记图失败:{e}"))?;
|
||||
let mut png = Vec::new();
|
||||
image::DynamicImage::ImageRgba8(image)
|
||||
image
|
||||
.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png)
|
||||
.map_err(|e| format!("编码标记图失败:{e}"))?;
|
||||
Ok(format!(
|
||||
|
||||
Reference in New Issue
Block a user