image: Move background color guess to other thread
Also, skip it completely for JPEG and BMP Issue #111
This commit is contained in:
parent
114c292225
commit
1b18486826
2 changed files with 71 additions and 43 deletions
|
|
@ -31,6 +31,13 @@ impl ImageFormat {
|
|||
pub fn is_svg(&self) -> bool {
|
||||
matches!(self, Self::Svg)
|
||||
}
|
||||
|
||||
pub fn is_potentially_transparent(&self) -> bool {
|
||||
!matches!(
|
||||
self,
|
||||
Self::ImageRs(image_rs::ImageFormat::Bmp) | Self::ImageRs(image_rs::ImageFormat::Jpeg)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for ImageFormat {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue