aboutsummaryrefslogtreecommitdiff
path: root/src/bin/textures.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/textures.rs')
-rw-r--r--src/bin/textures.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/textures.rs b/src/bin/textures.rs
index 4a35de7..5db888e 100644
--- a/src/bin/textures.rs
+++ b/src/bin/textures.rs
@@ -51,7 +51,7 @@ fn main() -> anyhow::Result<()> {
let mut texture = Texture2D::from_value(value).unwrap();
if texture.image_data.len() == 0 {
let ress = ress.as_mut().unwrap();
- ress.seek(SeekFrom::Start(texture.stream_data.offset as u64))?;
+ ress.seek(SeekFrom::Start(texture.stream_data.offset))?;
ress.by_ref()
.take(texture.stream_data.size as u64)
.read_to_end(&mut texture.image_data)?;
@@ -62,8 +62,10 @@ fn main() -> anyhow::Result<()> {
);
match texture.to_image() {
Ok(im) => {
- im.save(&path).unwrap();
- println!("{path}");
+ if !im.as_rgba32f().is_some() {
+ im.save(&path).unwrap();
+ println!("{path}");
+ }
}
Err(e) => warn!("{e}"),
}