Struct image2::Image [−][src]
Expand description
Image type
Fields
meta: Meta<T, C>
Metadata
data: Box<[T]>
Pixel data
Implementations
Create a new image with the given size and data
Safety
This is marked as unsafe because it does not check to ensure the data passed in matches the dimensions
Create a new image with the same size and color as an existing image with the given type
Create a new image with the same size and type as an existing image with the given color
Create a new image with the same size as an existing image with the given type and color
Convert image data into byte vec
Get image data as mutable bytes
Get mutable data at specified index
Set data to specified location
Returns true when (x, y) is in bounds for the given image
Get image data from an image, reusing an existing data buffer big enough for a single pixel
Load data from and Image
into an existing Pixel
structure
Set a normalized pixel to the specified location
Iterate over mutable image rows
Iterate over image rows
pub fn row_range_mut(
&mut self,
y: usize,
height: usize
) -> impl ParallelIterator<Item = (usize, &mut [T])>
pub fn row_range_mut(
&mut self,
y: usize,
height: usize
) -> impl ParallelIterator<Item = (usize, &mut [T])>
Iterate over mutable image rows
pub fn iter_region_mut<'a>(
&'a mut self,
roi: Region
) -> impl 'a + ParallelIterator<Item = (Point, DataMut<'_, T, C>)>
pub fn iter_region_mut<'a>(
&'a mut self,
roi: Region
) -> impl 'a + ParallelIterator<Item = (Point, DataMut<'_, T, C>)>
Iterate over part of an image with mutable data access
pub fn iter_region<'a>(
&'a self,
roi: Region
) -> impl 'a + ParallelIterator<Item = (Point, Data<'_, T, C>)>
pub fn iter_region<'a>(
&'a self,
roi: Region
) -> impl 'a + ParallelIterator<Item = (Point, Data<'_, T, C>)>
Iterate over part of an image
Get pixel iterator
Get mutable pixel iterator
Iterate over each pixel applying f
to every pixel
Iterate over a region of pixels qpplying f
to every pixel
Iterate over each pixel of two images at once
Iterate over pixels, with a mutable closure
Iterate over pixels in region, with a mutable closure
Iterate over mutable pixels, with a mutable closure
Iterate over mutable pixels in region, with a mutable closure
Copy into a region from another image starting at the given offset
Apply a filter using an Image as output
Apply an async filter using an Image as output
Run a filter using the same Image as input and output
Run a filter using an Image as input
Run an async filter using an Image as input
Convert image type/color
Convert to log RGB
Convert to linear RGB
Use the image as a mutable halide_buffer_t
Use the image as a mutable halide_buffer_t
Trait Implementations
impl<'de, T: Type, C: Color> Deserialize<'de> for Image<T, C> where
T: Deserialize<'de>,
C: Deserialize<'de>,
impl<'de, T: Type, C: Color> Deserialize<'de> for Image<T, C> where
T: Deserialize<'de>,
C: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T, C> RefUnwindSafe for Image<T, C> where
C: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, C> UnwindSafe for Image<T, C> where
C: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more