Function sc_extract::process_sc [−][src]
pub fn process_sc(
data: &[u8],
file_name: &str,
out_dir: &Path,
png_dir: &Path,
parallelize: bool
) -> Result<(), Error>
Processes extracted .sc
file data.
This function does NOT process files with .sc
extension. It process
the file generated after using QuickBMS on the .sc
file. The png images
extracted from _tex.sc
file corresponding to this .sc
file must be
present in png_dir
.
A single .sc
file contains data for multiple sprites. All of the
sprites are extracted and saved by this process in the out_dir
.
parallelize
tells if the directory files are processed parallelly. It is
simply used to control the stdout output. Within this function, sprites are
always processed parallelly to increase efficiency.
Errors
If the png images are not present, Error::Other
is returned.
If decompression is unsuccessful, Error::DecompressionError
is returned.
If out_dir
does not exist or if reading images from png_dir
is not
possible, Error::IoError
is returned.