mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update rust-stb-image
This commit is contained in:
parent
c3efff57bf
commit
0866359a10
2 changed files with 6 additions and 2 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit d2c440d749dcfae0e8388b0b57d71e5e3c071dc2
|
Subproject commit 2ed2c51aa04b6ec13554fec6674aef5a1573d753
|
|
@ -22,7 +22,11 @@ fn test_image_bin() -> ~[u8] {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_from_memory(buffer: &[u8]) -> Option<Image> {
|
pub fn load_from_memory(buffer: &[u8]) -> Option<Image> {
|
||||||
do stb_image::load_from_memory(buffer).map |image| {
|
|
||||||
|
// Can't remember why we do this. Maybe it's what cairo wants
|
||||||
|
const FORCE_DEPTH: uint = 4;
|
||||||
|
|
||||||
|
do stb_image::load_from_memory_with_depth(buffer, FORCE_DEPTH).map |image| {
|
||||||
|
|
||||||
assert image.depth == 4;
|
assert image.depth == 4;
|
||||||
// Do color space conversion :(
|
// Do color space conversion :(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue