Struct amethyst_renderer::JpgFormat [−][src]
pub struct JpgFormat;
Allows loading of jpg or jpeg files.
Methods
impl JpgFormat[src]
impl JpgFormatpub fn from_data(
&self,
data: Vec<u8>,
options: TextureMetadata
) -> Result<TextureData>[src]
pub fn from_data(
&self,
data: Vec<u8>,
options: TextureMetadata
) -> Result<TextureData>Load Jpg from memory buffer
Trait Implementations
impl Clone for JpgFormat[src]
impl Clone for JpgFormatfn clone(&self) -> JpgFormat[src]
fn clone(&self) -> JpgFormatReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl SimpleFormat<Texture> for JpgFormat[src]
impl SimpleFormat<Texture> for JpgFormatconst NAME: &'static str
NAME: &'static str = "JPEG"
A unique identifier for this format.
type Options = TextureMetadata
Options specific to the format, which are passed to import. E.g. for textures this would be stuff like mipmap levels and sampler info. Read more
fn import(
&self,
bytes: Vec<u8>,
options: TextureMetadata
) -> Result<TextureData>[src]
fn import(
&self,
bytes: Vec<u8>,
options: TextureMetadata
) -> Result<TextureData>Produces asset data from given bytes.