skia_safe::images

Function raster_from_compressed_texture_data

Source
pub fn raster_from_compressed_texture_data(
    data: impl Into<Data>,
    dimensions: impl Into<ISize>,
    ty: TextureCompressionType,
) -> Option<Image>
Expand description

Creates a CPU-backed Image from compressed data.

This method will decompress the compressed data and create an image wrapping it. Any mipmap levels present in the compressed data are discarded.

  • data - compressed data to store in Image
  • dimension - width and height of full Image
  • ty - type of compression used

Returns: created Image, or None