Add support to create BGI sysgrp image

This commit is contained in:
2025-06-14 16:44:42 +08:00
parent 1e70036d47
commit d807b9fe5b
6 changed files with 235 additions and 11 deletions

View File

@@ -201,6 +201,8 @@ pub struct ExtraConfig {
pub image_type: Option<ImageOutputType>,
#[cfg(all(feature = "bgi-arc", feature = "bgi-img"))]
pub bgi_is_sysgrp_arc: Option<bool>,
#[cfg(feature = "bgi-img")]
pub bgi_img_scramble: Option<bool>,
}
#[derive(Clone, Copy, Debug, ValueEnum, PartialEq, Eq, PartialOrd, Ord)]
@@ -320,7 +322,7 @@ pub enum ImageColorType {
#[cfg(feature = "image")]
impl ImageColorType {
pub fn bbp(&self, depth: u8) -> u16 {
pub fn bpp(&self, depth: u8) -> u16 {
match self {
ImageColorType::Grayscale => depth as u16,
ImageColorType::Rgb => depth as u16 * 3,