Struct openexr::core::preview_image::PreviewImage [−][src]
#[repr(transparent)]pub struct PreviewImage(_);
Expand description
A usually small, low-dynamic range image, that is intended to be stored in an image file’s header
Implementations
Creates a new PreviewImage
with dimensions width = 0 and height = 0
Errors
Error::Base
- If an error occurs
Creates a new PreviewImage
with the provided dimensions
Errors
Error::Overflow
- If the size of the image is bigger than the supported sizeError::Base
- If an error occurs
pub fn with_pixels(
width: u32,
height: u32,
pixels: &[PreviewRgba]
) -> Result<PreviewImage, Error>
pub fn with_pixels(
width: u32,
height: u32,
pixels: &[PreviewRgba]
) -> Result<PreviewImage, Error>
Creates a new PreviewImage
with the provided dimensions and pixels
Errors
Error::Overflow
- If the size of the image is bigger than the supported sizeError::Base
- If an error occurs
Returns the width of the PreviewImage
Returns the height of the PreviewImage
Get the image pixels as a slice
Get the image pixels as a mutable slice
Sets the pixel value at the specified coordinates
Errors
Error::OutOfRange
- If the coordinates are outside of the image sizeError::Base
- If an error occurs
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PreviewImage
impl !Send for PreviewImage
impl !Sync for PreviewImage
impl Unpin for PreviewImage
impl UnwindSafe for PreviewImage
Blanket Implementations
Mutably borrows from an owned value. Read more