Function sc_extract::process_tex [−][src]
pub fn process_tex(
raw_data: &[u8],
file_name: &str,
out_dir: &Path,
parallelize: bool
) -> Result<(), Error>
Processes compressed, raw _tex.sc
file data.
If decompressing and pixel conversion is successful, the resultant png
image is saved in the output directory (out_dir
).
A single _tex.sc
file can contain data for multiple sprites. All of the
sprites are extracted and saved by this process. _
s are appended to the
file name in cases of multiple sprites.
parallelize
tells if the directory files are processed parallelly. It is
simply used to control the stdout output.
Errors
If decompression is unsuccessful, Error::DecompressionError
is returned.
Pixel conversion errors are handled in the function itself.
Error::IoError
is returned if an IO operation fails.