pub fn from_bytes(bytes: &[u8], source: &str) -> Result<Texture, TextureError> {
        let mut texture = Texture::new();

        let data = RawImageData::from_bytes(bytes, source)?;
        texture.load_raw_image_data(data)?;

        Ok(texture)
    }
/// Creates a texturer from the bytes in a image file. The bytes can be sourced with the
/// `include_bytes!` macro. `source` is only used for context in error messages.
Creates a texturer from the bytes in a image file. The bytes can be sourced with the
`include_bytes!` macro. `source` is only used for context in error messages.
Creates a texturer from the bytes in a image file . The bytes can be sourced with the ` include_bytes! ` macro . ` source ` is only used for context in error messages .
pub fn from_bytes(bytes: &[u8], source: &str) -> Result<Texture, TextureError> {
        let mut texture = Texture::new();
        let data = RawImageData::from_bytes(bytes, source)?;
        texture.load_raw_image_data(data)?;
        Ok(texture)
    }
pub fn from_bytes ( bytes : & [ u8 ] , source : & str ) -> Result < Texture , TextureError > { let mut texture = Texture :: new ( ) ; let data = RawImageData :: from_bytes ( bytes , source ) ? ; texture . load_raw_image_data ( data ) ? ; Ok ( texture ) }
Creates a texturer from the bytes in a image file.
Creates a texturer from the bytes in a image file .
bytes
&[u8]
source
&str
bytes
&[u8]
source
&str