mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-26 13:47:08 +08:00
Add jpeg support
This commit is contained in:
@@ -255,6 +255,8 @@ pub struct ExtraConfig {
|
||||
pub ex_hibit_rld_keys: Option<Box<[u32; 0x100]>>,
|
||||
#[cfg(feature = "ex-hibit")]
|
||||
pub ex_hibit_rld_def_keys: Option<Box<[u32; 0x100]>>,
|
||||
#[cfg(feature = "mozjpeg")]
|
||||
pub jpeg_quality: u8,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, ValueEnum, PartialEq, Eq, PartialOrd, Ord)]
|
||||
@@ -465,6 +467,8 @@ impl ImageColorType {
|
||||
#[derive(Clone, Copy, Debug, ValueEnum, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub enum ImageOutputType {
|
||||
Png,
|
||||
#[cfg(feature = "image-jpg")]
|
||||
Jpg,
|
||||
}
|
||||
|
||||
#[cfg(feature = "image")]
|
||||
@@ -472,6 +476,8 @@ impl AsRef<str> for ImageOutputType {
|
||||
fn as_ref(&self) -> &str {
|
||||
match self {
|
||||
ImageOutputType::Png => "png",
|
||||
#[cfg(feature = "image-jpg")]
|
||||
ImageOutputType::Jpg => "jpg",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user