Open fintelia opened 3 years ago
Are there any plans to continue this?
I added a basic support in #1903.
Png is not always available, so I added a type field to safely convert the byte stream to the corresponding type
I'm not familiar with bytemuck, is there an interface to cast Vec<u8>
as Option<Vec16>>
?
Nope. Even if the Vec<u8>
is properly aligned, the allocator may treat [u8]
and [u16]
differently so dropping the Vec<u16>
may misbehave (because the slice was allocated with type u8
but freed via the u16
codepath).
Requested by @GalAster in this comment: