Function three_d::io::image_from_bytes [−][src]
pub fn image_from_bytes(bytes: &[u8]) -> ThreeDResult<CPUTexture<u8>>
Expand description
Deserialize the given bytes representing an image into a CPUTexture using the image crate. The CPUTexture can then be used to create a Texture2D. Supported formats: PNG, JPEG, GIF, WebP, pnm (pbm, pgm, ppm and pam), TIFF, DDS, BMP, ICO, HDR, farbfeld. Note: If the image contains and you want to load high dynamic range (hdr) information, use hdr_image_from_bytes instead.