Struct basis_universal::encoding::CompressorImageRef[][src]

pub struct CompressorImageRef(pub *mut basisu_image);

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.