pub struct ImageDecodeParams {
pub is_indexed: bool,
pub bpc: Option<u8>,
pub num_components: Option<u8>,
pub target_dimension: Option<(u32, u32)>,
pub width: u32,
pub height: u32,
pub pixel_limit: Option<u32>,
}Expand description
Additional parameters for decoding images.
Fields§
§is_indexed: boolWhether the color space of the image is an indexed color space.
bpc: Option<u8>The bits per component of the image, if that information is available.
num_components: Option<u8>The components per channel of the image, if that information is available.
target_dimension: Option<(u32, u32)>A target resolution for the image. Note that this is only a hint so that in case it’s possible, a version of the image will be extracted that is as close as possible to the hinted dimension.
width: u32The width of the image as indicated by the image dictionary.
height: u32The height of the image as indicated by the image dictionary.
pixel_limit: Option<u32>The image pixel limit in force, if one is configured.
Set by Stream::decoded_image from the stream’s own context, not by
the caller. A filter cannot read it for itself: the only dictionary it
receives is /DecodeParms, which is Dict::default() when the stream
has none – and that carries a context with no limits at all. The CCITT
decoder’s own limit check was reading exactly that, so a stream without
/DecodeParms skipped it entirely. (Codex, #1609.)
Trait Implementations§
Source§impl Clone for ImageDecodeParams
impl Clone for ImageDecodeParams
Source§fn clone(&self) -> ImageDecodeParams
fn clone(&self) -> ImageDecodeParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more