More useful stb-image error handling

This commit is contained in:
Keegan McAllister 2014-11-02 15:20:22 -08:00
parent 035ff19e4a
commit a4bf64c582

View file

@ -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
}
}
}
}