#[non_exhaustive]pub struct J2kLossyEncodeOptions {Show 13 fields
pub backend: EncodeBackendPreference,
pub block_coding_mode: J2kBlockCodingMode,
pub progression: J2kProgressionOrder,
pub max_decomposition_levels: Option<u8>,
pub rate_target: Option<J2kRateTarget>,
pub quality_layers: Vec<J2kQualityLayer>,
pub tile_size: Option<(u32, u32)>,
pub tile_part_packet_limit: Option<u16>,
pub precinct_exponents: Vec<(u8, u8)>,
pub marker_segments: Vec<J2kMarkerSegment>,
pub psnr_tolerance_db: f64,
pub psnr_iteration_budget: u8,
pub validation: J2kEncodeValidation,
}Expand description
Options controlling stable lossy JPEG 2000 encoding.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.backend: EncodeBackendPreferenceBackend preference for encode stages.
block_coding_mode: J2kBlockCodingModeCode-block coding mode for the codestream.
progression: J2kProgressionOrderPacket progression order.
max_decomposition_levels: Option<u8>Optional explicit lossy decomposition level request.
rate_target: Option<J2kRateTarget>Single codestream rate target.
quality_layers: Vec<J2kQualityLayer>Cumulative quality layer targets.
tile_size: Option<(u32, u32)>Optional tile width and height.
tile_part_packet_limit: Option<u16>Optional maximum number of complete packets to place in each tile-part.
precinct_exponents: Vec<(u8, u8)>Optional precinct exponents in COD/COC order.
marker_segments: Vec<J2kMarkerSegment>Optional marker segments requested for the codestream.
psnr_tolerance_db: f64Allowed PSNR target tolerance in dB.
psnr_iteration_budget: u8Iteration budget for lossy target searches.
validation: J2kEncodeValidationValidation policy applied before returning encoded bytes.
Implementations§
Source§impl J2kLossyEncodeOptions
impl J2kLossyEncodeOptions
Sourcepub fn with_backend(self, backend: EncodeBackendPreference) -> Self
pub fn with_backend(self, backend: EncodeBackendPreference) -> Self
Return options with a different backend preference.
Sourcepub fn with_accelerated_backend(self) -> Self
pub fn with_accelerated_backend(self) -> Self
Return options using adaptive accelerated routing.
Sourcepub fn with_cpu_only_backend(self) -> Self
pub fn with_cpu_only_backend(self) -> Self
Return options using the portable CPU route.
Sourcepub fn with_strict_device_backend(self) -> Self
pub fn with_strict_device_backend(self) -> Self
Return options requiring a strict device route.
Sourcepub fn with_block_coding_mode(
self,
block_coding_mode: J2kBlockCodingMode,
) -> Self
pub fn with_block_coding_mode( self, block_coding_mode: J2kBlockCodingMode, ) -> Self
Return options with a different code-block coding mode.
Sourcepub fn with_progression(self, progression: J2kProgressionOrder) -> Self
pub fn with_progression(self, progression: J2kProgressionOrder) -> Self
Return options with a different packet progression order.
Sourcepub fn with_max_decomposition_levels(
self,
max_decomposition_levels: Option<u8>,
) -> Self
pub fn with_max_decomposition_levels( self, max_decomposition_levels: Option<u8>, ) -> Self
Return options with a different maximum decomposition-level request.
Sourcepub fn with_rate_target(self, rate_target: Option<J2kRateTarget>) -> Self
pub fn with_rate_target(self, rate_target: Option<J2kRateTarget>) -> Self
Return options with a different single codestream rate target.
Sourcepub fn with_quality_layers(self, quality_layers: Vec<J2kQualityLayer>) -> Self
pub fn with_quality_layers(self, quality_layers: Vec<J2kQualityLayer>) -> Self
Return options with different cumulative quality layer targets.
Sourcepub fn with_tile_size(self, tile_size: Option<(u32, u32)>) -> Self
pub fn with_tile_size(self, tile_size: Option<(u32, u32)>) -> Self
Return options with a different tile size.
Sourcepub fn with_tile_part_packet_limit(
self,
tile_part_packet_limit: Option<u16>,
) -> Self
pub fn with_tile_part_packet_limit( self, tile_part_packet_limit: Option<u16>, ) -> Self
Return options with a different tile-part packet limit.
Sourcepub fn with_marker_segments(
self,
marker_segments: Vec<J2kMarkerSegment>,
) -> Self
pub fn with_marker_segments( self, marker_segments: Vec<J2kMarkerSegment>, ) -> Self
Return options with different optional marker segment requests.
Sourcepub fn with_validation(self, validation: J2kEncodeValidation) -> Self
pub fn with_validation(self, validation: J2kEncodeValidation) -> Self
Return options with a different validation policy.
Trait Implementations§
Source§impl Clone for J2kLossyEncodeOptions
impl Clone for J2kLossyEncodeOptions
Source§fn clone(&self) -> J2kLossyEncodeOptions
fn clone(&self) -> J2kLossyEncodeOptions
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 J2kLossyEncodeOptions
impl Debug for J2kLossyEncodeOptions
Source§impl Default for J2kLossyEncodeOptions
impl Default for J2kLossyEncodeOptions
Source§impl PartialEq for J2kLossyEncodeOptions
impl PartialEq for J2kLossyEncodeOptions
impl StructuralPartialEq for J2kLossyEncodeOptions
Auto Trait Implementations§
impl Freeze for J2kLossyEncodeOptions
impl RefUnwindSafe for J2kLossyEncodeOptions
impl Send for J2kLossyEncodeOptions
impl Sync for J2kLossyEncodeOptions
impl Unpin for J2kLossyEncodeOptions
impl UnsafeUnpin for J2kLossyEncodeOptions
impl UnwindSafe for J2kLossyEncodeOptions
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