Struct Options
pub struct Options {
pub zero_initialized: SkCodec_ZeroInitialized,
pub subset: Option<IRect>,
pub frame_index: usize,
pub prior_frame: Option<usize>,
pub max_decode_memory: Option<usize>,
}Expand description
Additional options to pass to Codec::get_pixels_with_options.
Fields§
§zero_initialized: SkCodec_ZeroInitialized§subset: Option<IRect>If Some, represents a subset of the original image to decode. Must be within the bounds
returned by Codec::info(). If the encoded format is EncodedImageFormat::WEBP (the only
one which currently supports subsets), the top and left values must be even.
In Codec::get_pixels_with_options and incremental decode, we will attempt to decode the
exact rectangular subset specified by the subset.
In a scanline decode, it does not make sense to specify a subset top or subset height, since
the client already controls which rows to get and which rows to skip. During scanline
decodes, we will require that the subset top be zero and the subset height be equal to the
full height. We will, however, use the values of subset left and subset width to decode
partial scanlines on calls to Codec::get_scanlines().
frame_index: usizeThe frame to decode.
Only meaningful for multi-frame images.
prior_frame: Option<usize>If not None, the dst already contains the prior frame at this index.
Only meaningful for multi-frame images.
If frame_index needs to be blended with a prior frame (as reported by
Codec::get_frame_info()[frame_index].FrameInfo::required_frame), the client can
set this to any non-RestorePrevious frame in [required_frame, frame_index) to
indicate that that frame is already in the dst. Options.zero_initialized is ignored in this
case.
If set to None, the codec will decode any necessary required frame(s) first.
max_decode_memory: Option<usize>If non-zero, image decoding will fail if cumulative allocations exceed this many bytes.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.