mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-07 13:28:47 +08:00
Add support to create BGI sysgrp image
This commit is contained in:
@@ -124,6 +124,7 @@ pub trait ScriptBuilder: std::fmt::Debug {
|
||||
&'a self,
|
||||
_data: ImageData,
|
||||
_writer: Box<dyn WriteSeek + 'a>,
|
||||
_options: &ExtraConfig,
|
||||
) -> Result<()> {
|
||||
Err(anyhow::anyhow!(
|
||||
"This script type does not support creating an image file."
|
||||
@@ -131,10 +132,15 @@ pub trait ScriptBuilder: std::fmt::Debug {
|
||||
}
|
||||
|
||||
#[cfg(feature = "image")]
|
||||
fn create_image_file_filename(&self, data: ImageData, filename: &str) -> Result<()> {
|
||||
fn create_image_file_filename(
|
||||
&self,
|
||||
data: ImageData,
|
||||
filename: &str,
|
||||
options: &ExtraConfig,
|
||||
) -> Result<()> {
|
||||
let f = std::fs::File::create(filename)?;
|
||||
let f = std::io::BufWriter::new(f);
|
||||
self.create_image_file(data, Box::new(f))
|
||||
self.create_image_file(data, Box::new(f), options)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user