Struct libjxl_sys::JxlPixelFormat
source · [−]#[repr(C)]pub struct JxlPixelFormat {
pub num_channels: u32,
pub data_type: JxlDataType,
pub endianness: JxlEndianness,
pub align: usize,
}
Expand description
Data type for the sample values per channel per pixel for the output buffer for pixels. This is not necessarily the same as the data type encoded in the codestream. The channels are interleaved per pixel. The pixels are organized row by row, left to right, top to bottom. TODO(lode): implement padding / alignment (row stride) TODO(lode): support different channel orders if needed (RGB, BGR, …)
Fields
num_channels: u32
Amount of channels available in a pixel buffer. 1: single-channel data, e.g. grayscale or a single extra channel 2: single-channel + alpha 3: trichromatic, e.g. RGB 4: trichromatic + alpha TODO(lode): this needs finetuning. It is not yet defined how the user chooses output color space. CMYK+alpha needs 5 channels.
data_type: JxlDataType
Data type of each channel.
endianness: JxlEndianness
Whether multi-byte data types are represented in big endian or little endian format. This applies to JXL_TYPE_UINT16, JXL_TYPE_UINT32 and JXL_TYPE_FLOAT.
align: usize
Align scanlines to a multiple of align bytes, or 0 to require no alignment at all (which has the same effect as value 1)
Trait Implementations
sourceimpl Clone for JxlPixelFormat
impl Clone for JxlPixelFormat
sourcefn clone(&self) -> JxlPixelFormat
fn clone(&self) -> JxlPixelFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for JxlPixelFormat
impl Debug for JxlPixelFormat
sourceimpl Default for JxlPixelFormat
impl Default for JxlPixelFormat
impl Copy for JxlPixelFormat
Auto Trait Implementations
impl RefUnwindSafe for JxlPixelFormat
impl Send for JxlPixelFormat
impl Sync for JxlPixelFormat
impl Unpin for JxlPixelFormat
impl UnwindSafe for JxlPixelFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more