pub struct RgbImage {
pub data: Vec<u16>,
/* private fields */
}Expand description
A simple container for RGB image data.
Fields§
§data: Vec<u16>Interleaved RGB data (R, G, B, R, G, B…)
Implementations§
Source§impl RgbImage
impl RgbImage
Sourcepub fn new(width: u32, height: u32, data: Vec<u16>) -> Self
pub fn new(width: u32, height: u32, data: Vec<u16>) -> Self
Create a new RgbImage with an unknown color space.
Use with_color_space or
set_color_space when the space is known.
Sourcepub fn with_color_space(
width: u32,
height: u32,
data: Vec<u16>,
color_space: ColorSpace,
) -> Self
pub fn with_color_space( width: u32, height: u32, data: Vec<u16>, color_space: ColorSpace, ) -> Self
Create a new RgbImage tagged with a known color space.
Sourcepub fn baseline_exposure(&self) -> Option<f32>
pub fn baseline_exposure(&self) -> Option<f32>
Baseline exposure offset in EV.
Sourcepub fn default_crop(&self) -> Option<Rect>
pub fn default_crop(&self) -> Option<Rect>
Default crop rectangle.
Sourcepub fn color_space(&self) -> ColorSpace
pub fn color_space(&self) -> ColorSpace
The color space the RGB samples are in.
Sourcepub fn set_baseline_exposure(&mut self, ev: Option<f32>)
pub fn set_baseline_exposure(&mut self, ev: Option<f32>)
Set baseline exposure offset.
Sourcepub fn set_color_space(&mut self, color_space: ColorSpace)
pub fn set_color_space(&mut self, color_space: ColorSpace)
Set the color space tag for the RGB samples.
Sourcepub fn set_default_crop(&mut self, crop: Option<Rect>)
pub fn set_default_crop(&mut self, crop: Option<Rect>)
Set default crop rectangle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RgbImage
impl RefUnwindSafe for RgbImage
impl Send for RgbImage
impl Sync for RgbImage
impl Unpin for RgbImage
impl UnsafeUnpin for RgbImage
impl UnwindSafe for RgbImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more