Enum image::flat::NormalForm
source · [−]pub enum NormalForm {
Unaliased,
PixelPacked,
ImagePacked,
RowMajorPacked,
ColumnMajorPacked,
}
Expand description
Different normal forms of buffers.
A normal form is an unaliased buffer with some additional constraints. The ÌmageBuffer
uses
row major form with packed samples.
Variants
Unaliased
No pixel aliases another.
Unaliased also guarantees that all index calculations in the image bounds using
dim_index*dim_stride
(such as x*width_stride + y*height_stride
) do not overflow.
PixelPacked
At least pixels are packed.
Images of these types can wrap [T]
-slices into the standard color types. This is a
precondition for GenericImage
which requires by-reference access to pixels.
ImagePacked
All samples are packed.
This is orthogonal to PixelPacked
. It requires that there are no holes in the image but
it is not necessary that the pixel samples themselves are adjacent. An example of this
behaviour is a planar image layout.
RowMajorPacked
The samples are in row-major form and all samples are packed.
In addition to PixelPacked
and ImagePacked
this also asserts that the pixel matrix is
in row-major form.
ColumnMajorPacked
The samples are in column-major form and all samples are packed.
In addition to PixelPacked
and ImagePacked
this also asserts that the pixel matrix is
in column-major form.
Trait Implementations
sourceimpl Clone for NormalForm
impl Clone for NormalForm
sourcefn clone(&self) -> NormalForm
fn clone(&self) -> NormalForm
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for NormalForm
impl Debug for NormalForm
sourceimpl Hash for NormalForm
impl Hash for NormalForm
sourcefn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Hasher
]. Read more1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Hasher
]. Read moresourceimpl PartialEq<NormalForm> for NormalForm
impl PartialEq<NormalForm> for NormalForm
sourcefn eq(&self, other: &NormalForm) -> bool
fn eq(&self, other: &NormalForm) -> bool
sourceimpl PartialOrd<NormalForm> for NormalForm
impl PartialOrd<NormalForm> for NormalForm
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Compares the logical preconditions.
a < b
if the normal form a
has less preconditions than b
.
1.0.0const fn lt(&self, other: &Rhs) -> bool
const fn lt(&self, other: &Rhs) -> bool
1.0.0const fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more