Struct macroquad::texture::Image [−][src]
Expand description
Image, data stored in CPU memory
Fields
bytes: Vec<u8>
width: u16
height: u16
Implementations
Creates an Image from a slice of bytes that contains an encoded image.
If format
is None, it will make an educated guess on the
ImageFormat.
Example
let icon = Image::from_file_with_format(
include_bytes!("../examples/rust.png"),
Some(ImageFormat::Png),
);
Creates an Image filled with the provided Color.
Returns this image’s data as a slice of 4-byte arrays.
Returns this image’s data as a mutable slice of 4-byte arrays.
Saves this image as a PNG file.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Image
impl UnwindSafe for Image
Blanket Implementations
Mutably borrows from an owned value. Read more