Denotes invalid flat sample buffers when trying to convert to stricter types.
The biggest use case being
ImageBuffer which expects closely packed
samples in a row major matrix representation. But this error type may be
resused for other import functions. A more versatile user may also try to
correct the underlying representation depending on the error variant.
The represented image was too large.
The optional value denotes a possibly accepted maximal bound.
The represented image can not use this representation.
Has an additional value of the normalized form that would be accepted.
The color format did not match the channel count.
In some cases you might be able to fix this by lowering the reported pixel count of the buffer without touching the strides.
In very special circumstances you may do the opposite. This is VERY dangerous but not
directly memory unsafe although that will likely alias pixels. One scenario is when you
want to construct an
Rgba image but have only 3 bytes per pixel and for some reason don't
care about the value of the alpha channel even though you need
fn description(&self) -> &str1.0.0[src]
impl From<Error> for ImageError[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where1.3.0[src]
impl StructuralEq for Error[src]
impl StructuralPartialEq for Error[src]
impl RefUnwindSafe for Error
impl UnwindSafe for Error
type Owned = T
The resulting type after obtaining ownership.
pub fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.