Struct libwebp::boxed::WebpYuvBox
source · pub struct WebpYuvBox { /* private fields */ }Expand description
A variant of WebpBox for return values from WebPDecodeYUV.
See WebPDecodeYUV for examples.
Implementations§
source§impl WebpYuvBox
impl WebpYuvBox
sourcepub unsafe fn from_raw_yuv(y: *mut [u8], u: *mut [u8], v: *mut [u8]) -> WebpYuvBox
pub unsafe fn from_raw_yuv(y: *mut [u8], u: *mut [u8], v: *mut [u8]) -> WebpYuvBox
Creates WebpYuvBox from raw pointers.
Safety
y,u,vmust be non-null.- The pointees must be valid as
[u8]. - The pointees must be exclusively accessible.
- The head pointer of
ymust be freeable viaWebPFree. - The pointees of
uandvmust be within the allocated area designated by the head pointer ofy.
sourcepub fn into_raw_yuv(self) -> (*mut [u8], *mut [u8], *mut [u8])
pub fn into_raw_yuv(self) -> (*mut [u8], *mut [u8], *mut [u8])
Turns WebpYuvBox into raw pointers without freeing anything.
sourcepub fn yuv(&self) -> (&[u8], &[u8], &[u8])
pub fn yuv(&self) -> (&[u8], &[u8], &[u8])
Immutably, simultaneously dereferences to the y, u, and v slices.