File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 2
2
//!
3
3
//! https://github.com/webmproject/libwebp/blob/e4f7a9f0c7c9fbfae1568bc7fa5c94b989b50872/src/demux/anim_decode.c#L215-L267
4
4
5
- #[ cfg( target_endian = "big" ) ]
6
- fn channel_shift ( i : u32 ) -> u32 {
7
- 24 - ( i) * 8
8
- }
9
-
10
- #[ cfg( target_endian = "little" ) ]
11
5
fn channel_shift ( i : u32 ) -> u32 {
12
6
i * 8
13
7
}
@@ -61,7 +55,7 @@ fn blend_pixel_nonpremult(src: u32, dst: u32) -> u32 {
61
55
}
62
56
63
57
pub ( crate ) fn do_alpha_blending ( buffer : [ u8 ; 4 ] , canvas : [ u8 ; 4 ] ) -> [ u8 ; 4 ] {
64
- blend_pixel_nonpremult ( u32:: from_ne_bytes ( buffer) , u32:: from_ne_bytes ( canvas) ) . to_ne_bytes ( )
58
+ blend_pixel_nonpremult ( u32:: from_le_bytes ( buffer) , u32:: from_le_bytes ( canvas) ) . to_le_bytes ( )
65
59
}
66
60
67
61
/// Divides by 255, rounding to nearest (as opposed to down, like regular integer division does).
You can’t perform that action at this time.
0 commit comments