pub struct RasterImage<'a>(/* private fields */);Expand description
A raster image.
Implementations§
Source§impl RasterImage<'_>
impl RasterImage<'_>
Sourcepub fn with_rgba(
&self,
func: impl FnOnce(RgbData, Option<LumaData>),
target_dimension: Option<(u32, u32)>,
)
pub fn with_rgba( &self, func: impl FnOnce(RgbData, Option<LumaData>), target_dimension: Option<(u32, u32)>, )
Perform some operation with the RGB and alpha channel of the image.
The second argument allows you to give the image decoder a hint for what resolution of the image you want to have. Note that this does not mean that the resulting image will have that dimension. Instead, it allows the image decoder to extract a lower-resolution version of the image in certain cases.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RasterImage<'a>
impl<'a> !RefUnwindSafe for RasterImage<'a>
impl<'a> Send for RasterImage<'a>
impl<'a> Sync for RasterImage<'a>
impl<'a> Unpin for RasterImage<'a>
impl<'a> !UnwindSafe for RasterImage<'a>
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