Struct basis_universal::encoding::CompressorImageRef [−][src]
Implementations
impl CompressorImageRef[src]
pub fn invalidate(&mut self)[src]
Sets the image to be completely empty (i.e. 0 width, 0 height). (This was called clear in
the upstream API.)
pub fn resize(&mut self, width: u32, height: u32)[src]
Resizes the image to the given width/height
By default the pitch will be equal to the width. To customize this, use resize_with_pitch
pub fn resize_with_pitch(&mut self, width: u32, height: u32, pitch: u32)[src]
Resize the image to the given width/height with a custom "pitch". The pitch is the offset between rows and is not needed for all formats. By default, the pitch will be equal to the width
pub fn init(&mut self, data: &[u8], width: u32, height: u32, channel_count: u8)[src]
Resize the image and populate it with the given data.
channel_count should be the number of channels in the image (so >=1 and <= 4)
pub fn pixel_at(&self, width: u32, height: u32) -> Option<ColorU8>[src]
pub unsafe fn pixel_at_unchecked(&self, width: u32, height: u32) -> ColorU8[src]
pub fn width(&self) -> u32[src]
pub fn height(&self) -> u32[src]
pub fn pitch(&self) -> u32[src]
pub fn total_pixels(&self) -> u32[src]
pub fn block_width(&self, w: u32) -> u32[src]
pub fn block_height(&self, h: u32) -> u32[src]
pub fn total_blocks(&self, w: u32, h: u32) -> u32[src]
pub fn pixel_data_mut(&mut self) -> &mut [ColorU8][src]
pub fn pixel_data_u8_mut(&mut self) -> &mut [u8][src]
pub fn pixel_data_u32_mut(&mut self) -> &mut [u32][src]
Auto Trait Implementations
impl RefUnwindSafe for CompressorImageRef[src]
impl !Send for CompressorImageRef[src]
impl !Sync for CompressorImageRef[src]
impl Unpin for CompressorImageRef[src]
impl UnwindSafe for CompressorImageRef[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,