Struct BufferLayoutPreference
#[non_exhaustive]
pub struct BufferLayoutPreference { pub len: usize, pub sample_format: SampleFormat, pub sample_type: Option<DecodingSampleType>, pub row_stride: Option<NonZeroUsize>, pub planes: usize, pub plane_stride: Option<NonZeroUsize>, pub complete_len: usize }
Information on the byte buffer that should be supplied to the decoder.
This is relevant for Decoder::read_image_bytes and Decoder::read_chunk_bytes where the
caller provided buffer must fit the expectations of the decoder to be filled with data from the
current image.
Fields
len: usizeMinimum byte size of the buffer to read image data.
sample_format: SampleFormatThe interpretation of each sample in the image.
We only support a uniform sample layout. Detailed information for mixed colors may be added in the future and will become available by explicit query. The same goes for the bit-depth of samples that must also be uniform.
sample_type: Option<DecodingSampleType>The type representation for each sample. Only available for depths and formats which the library can describe.
row_stride: Option<NonZeroUsize>Minimum number of bytes to represent a row of image data of the requested content.
planes: usizeNumber of planes in the image.
plane_stride: Option<NonZeroUsize>Number of bytes used to represent one plane.
complete_len: usizeNumber of bytes of data when reading all planes.
Trait Implementations
impl Clone for BufferLayoutPreference
fn clone(&self) -> Self
impl Debug for BufferLayoutPreference
fn fmt(&self, f: &mut Formatter<'_>) -> Result