pub struct EncodeOptions {Show 21 fields
pub num_decomposition_levels: u8,
pub reversible: bool,
pub code_block_width_exp: u8,
pub code_block_height_exp: u8,
pub guard_bits: u8,
pub use_ht_block_coding: bool,
pub progression_order: EncodeProgressionOrder,
pub write_tlm: bool,
pub write_plt: bool,
pub write_plm: bool,
pub write_sop: bool,
pub write_eph: bool,
pub use_mct: bool,
pub num_layers: u8,
pub quality_layer_byte_targets: Vec<u64>,
pub validate_high_throughput_codestream: bool,
pub irreversible_quantization_scale: f32,
pub irreversible_quantization_subband_scales: IrreversibleQuantizationSubbandScales,
pub component_sampling: Option<Vec<(u8, u8)>>,
pub tile_size: Option<(u32, u32)>,
pub precinct_exponents: Vec<(u8, u8)>,
}Expand description
Encoding options for JPEG 2000.
Fields§
§num_decomposition_levels: u8Number of decomposition levels (default: 5).
reversible: boolUse reversible (lossless) transform (default: true).
code_block_width_exp: u8Code-block width exponent minus 2 (default: 4, meaning 2^6=64).
code_block_height_exp: u8Code-block height exponent minus 2 (default: 4, meaning 2^6=64).
guard_bits: u8Number of guard bits (default: 1 for reversible, 2 for irreversible).
use_ht_block_coding: boolEncode using HT block coding (HTJ2K / Part 15) instead of classic EBCOT.
progression_order: EncodeProgressionOrderPacket progression order to write in COD and use for packetization.
write_tlm: boolWrite a TLM marker segment for the single tile-part.
write_plt: boolWrite PLT packet-length marker segments in the tile-part header.
write_plm: boolWrite PLM packet-length marker segments in the main header.
write_sop: boolWrite SOP marker segments before packets.
write_eph: boolWrite EPH markers after packet headers.
use_mct: boolApply the JPEG 2000 multi-component color transform for 3+ component inputs.
num_layers: u8Number of cumulative quality layers to emit.
quality_layer_byte_targets: Vec<u64>Optional cumulative packet-body byte targets for each quality layer.
validate_high_throughput_codestream: boolDecode and verify HTJ2K codestreams inside the native encoder.
irreversible_quantization_scale: f32Multiplier applied to irreversible 9/7 scalar quantization step sizes.
1.0 preserves the near-lossless default step sizes. Larger values
produce smaller codestreams by coarsening quantization.
irreversible_quantization_subband_scales: IrreversibleQuantizationSubbandScalesPer-subband multipliers applied on top of
irreversible_quantization_scale.
component_sampling: Option<Vec<(u8, u8)>>Optional per-component SIZ sampling factors (XRsiz, YRsiz).
None means every component is stored at the reference-grid
resolution. This is experimental and primarily intended for precomputed
coefficient encoders that preserve JPEG-native chroma subsampling.
tile_size: Option<(u32, u32)>Optional tile width and height for multi-tile codestream output.
precinct_exponents: Vec<(u8, u8)>Optional precinct exponents in COD order, one per resolution level.
Trait Implementations§
Source§impl Clone for EncodeOptions
impl Clone for EncodeOptions
Source§fn clone(&self) -> EncodeOptions
fn clone(&self) -> EncodeOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncodeOptions
impl Debug for EncodeOptions
Source§impl Default for EncodeOptions
impl Default for EncodeOptions
Source§fn default() -> EncodeOptions
fn default() -> EncodeOptions
Auto Trait Implementations§
impl Freeze for EncodeOptions
impl RefUnwindSafe for EncodeOptions
impl Send for EncodeOptions
impl Sync for EncodeOptions
impl Unpin for EncodeOptions
impl UnsafeUnpin for EncodeOptions
impl UnwindSafe for EncodeOptions
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