Struct jpeg2k::DecodeParameters
source · pub struct DecodeParameters { /* private fields */ }
Implementations§
source§impl DecodeParameters
impl DecodeParameters
pub fn new() -> Self
sourcepub fn reduce(self, reduce: u32) -> Self
pub fn reduce(self, reduce: u32) -> Self
How much to reduce the image’s resolution.
If reduce == 0
, image is decoded to the full resolution. This is the default.
If reduce > 0
, then original dimension divided by 2^(reduce)
sourcepub fn strict(self, strict: bool) -> Self
pub fn strict(self, strict: bool) -> Self
Enable/disable strict decoing mode.
If disabled then progressive downloading is supported (truncated codestreams). This is the default. If enabled then partial/truncated codestreams will return an error.
sourcepub fn layers(self, layers: u32) -> Self
pub fn layers(self, layers: u32) -> Self
The number of quality layers to decode.
If there are less quality layers than the specified number, all the quality layers are decoded.
If layers == 0
, all the quality layers are decoded. This is the default.
If layers > 0
, then only the first layers
layers are decoded.
sourcepub fn decode_area(self, area: Option<DecodeArea>) -> Self
pub fn decode_area(self, area: Option<DecodeArea>) -> Self
The area to decode.
If area == None
, then the whole image will be decoded. This is the defult.
Trait Implementations§
source§impl Clone for DecodeParameters
impl Clone for DecodeParameters
source§fn clone(&self) -> DecodeParameters
fn clone(&self) -> DecodeParameters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for DecodeParameters
impl Default for DecodeParameters
impl Copy for DecodeParameters
Auto Trait Implementations§
impl Freeze for DecodeParameters
impl RefUnwindSafe for DecodeParameters
impl Send for DecodeParameters
impl Sync for DecodeParameters
impl Unpin for DecodeParameters
impl UnwindSafe for DecodeParameters
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)