fix image saving in some cases
This commit is contained in:
parent
23c006fe7b
commit
a4dc1c82ed
1 changed files with 2 additions and 0 deletions
|
@ -792,6 +792,8 @@ mod imp {
|
||||||
}
|
}
|
||||||
let resized =
|
let resized =
|
||||||
image_copy.resize(400, 400, image::imageops::FilterType::Lanczos3);
|
image_copy.resize(400, 400, image::imageops::FilterType::Lanczos3);
|
||||||
|
// resize reoutputs rgba image; we can't save an rgba jpeg
|
||||||
|
let resized = image::DynamicImage::ImageRgb8(resized.into());
|
||||||
resized.save_with_format(&save_path_copy, image::ImageFormat::Jpeg)?;
|
resized.save_with_format(&save_path_copy, image::ImageFormat::Jpeg)?;
|
||||||
*mpris_art_path = Some(save_path_copy);
|
*mpris_art_path = Some(save_path_copy);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue