pub struct DecodeSettings {
pub resolve_palette_indices: bool,
pub strict: bool,
pub target_resolution: Option<(u32, u32)>,
}Expand description
Settings to apply during decoding.
Fields§
§resolve_palette_indices: boolWhether palette indices should be resolved.
JPEG2000 images can be stored in two different ways. First, by storing RGB values (depending on the color space) for each pixel. Secondly, by only storing a single index for each channel, and then resolving the actual color using the index.
If you disable this option, in case you have an image with palette indices, they will not be resolved, but instead a grayscale image will be returned, with each pixel value corresponding to the palette index of the location.
strict: boolWhether strict mode should be enabled when decoding.
It is recommended to leave this flag disabled, unless you have a specific reason not to.
target_resolution: Option<(u32, u32)>A hint for the target resolution that the image should be decoded at.
Trait Implementations§
Source§impl Clone for DecodeSettings
impl Clone for DecodeSettings
Source§fn clone(&self) -> DecodeSettings
fn clone(&self) -> DecodeSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DecodeSettings
Source§impl Debug for DecodeSettings
impl Debug for DecodeSettings
Source§impl Default for DecodeSettings
impl Default for DecodeSettings
Source§fn default() -> DecodeSettings
fn default() -> DecodeSettings
Auto Trait Implementations§
impl Freeze for DecodeSettings
impl RefUnwindSafe for DecodeSettings
impl Send for DecodeSettings
impl Sync for DecodeSettings
impl Unpin for DecodeSettings
impl UnsafeUnpin for DecodeSettings
impl UnwindSafe for DecodeSettings
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