mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
More useful stb-image error handling
This commit is contained in:
parent
035ff19e4a
commit
a4bf64c582
1 changed files with 8 additions and 2 deletions
|
@ -75,8 +75,14 @@ pub fn load_from_memory(buffer: &[u8]) -> Option<Image> {
|
|||
pixels: png::RGBA8(image.data)
|
||||
})
|
||||
}
|
||||
stb_image::ImageF32(_image) => fail!("HDR images not implemented"),
|
||||
stb_image::Error(_) => None
|
||||
stb_image::ImageF32(_image) => {
|
||||
error!("HDR images not implemented");
|
||||
None
|
||||
}
|
||||
stb_image::Error(e) => {
|
||||
error!("stb_image failed: {}", e);
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue