pub struct Raw1Image {
pub indexed_rgb: Vec<u8>,
pub indexed_alpha: Vec<u8>,
}
Fields§
§indexed_rgb: Vec<u8>
BGR component values can be obtained by using indexedRGB values as an index in lutBGR. When producing such values using color matching be aware of the linear nature of the color space. For best results it is recommended that color matching be performed in sRGB or other perceptual color spaces.
indexed_alpha: Vec<u8>
Alpha component can be obtained by breaking indexedAlpha into a bit field of alphaBits bit length fragments and then using the bit fragment as the alpha value for the pixel. The alpha pixel components are ordered from least significant to most significant bit with bytes following the same pixel order as indexedRGB. Since the alpha is to alphaBits precision it may need to be resampled to 8 bits be useful depending on the imaging framework used.
Example of different alpha packing in a byte:
MSB <-> LSB where number indicates the sequential pixel the bits belong to
ALPHA_8B -> 11111111
ALPHA_4B -> 22221111
ALPHA_1B -> 87654321
Implementations§
Trait Implementations§
Source§impl Ord for Raw1Image
impl Ord for Raw1Image
Source§impl PartialOrd for Raw1Image
impl PartialOrd for Raw1Image
impl Eq for Raw1Image
impl StructuralPartialEq for Raw1Image
Auto Trait Implementations§
impl Freeze for Raw1Image
impl RefUnwindSafe for Raw1Image
impl Send for Raw1Image
impl Sync for Raw1Image
impl Unpin for Raw1Image
impl UnwindSafe for Raw1Image
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more