Function nannou::wgpu::texture_format_from_image_color_type
source · pub fn texture_format_from_image_color_type(
color_type: ColorType
) -> Option<TextureFormat>
Expand description
Convert the given color type from the image
crate to the corresponding wgpu texture format.
Returns None
if there is no directly compatible texture format - this is normally the case if
the ColorType
would have a bits_per_pixel that is not equal to a power of 2.
The Rgba8
and Bgra8
color types are assumed to be non-linear sRGB.