#[non_exhaustive]pub struct Palette { /* private fields */ }Expand description
A JP2 file’s palette, from its pclr box: a table of NE entries (1 to
1024), each a row of one value per column (1 to 255 columns).
Entry j, column i is entry(j)[i]. A value is the entry’s stored
bytes (the column’s depth rounded up to whole bytes, at most 4) read as a
big-endian unsigned number and cast to i32, as OpenJPEG does: a signed
column’s values are not sign-extended. The decoder clamps each index to
0..entry_count(); entry does not, and returns None
past the last entry.
The table is at most 1024 entries by 255 columns of i32, about 1 MiB, and
is bounded by the bytes the pclr box holds. It is #[non_exhaustive] and
built only by the decoder.
Implementations§
Trait Implementations§
impl Eq for Palette
impl StructuralPartialEq for Palette
Auto Trait Implementations§
impl Forget for Palette
impl Freeze for Palette
impl Move for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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