Codec.Options

class Options

Additional options to pass to getPixels.

Methods

__init__

__init__(self: skia.Codec.Options) -> None

Attributes

fFrameIndex

The frame to decode.

fPriorFrame

If not kNoFrame, the dst already contains the prior frame at this index.

fSubset

If not NULL, represents a subset of the original image to decode.

fZeroInitialized

Methods

Options.__init__(self: skia.Codec.Options) None

__init__(self: skia.Codec.Options) -> None

Attributes

Options.fFrameIndex

The frame to decode.

Only meaningful for multi-frame images.

Options.fPriorFrame

If not kNoFrame, the dst already contains the prior frame at this index.

Only meaningful for multi-frame images.

If fFrameIndex needs to be blended with a prior frame (as reported by getFrameInfo[fFrameIndex].fRequiredFrame), the client can set this to any non-kRestorePrevious frame in [fRequiredFrame, fFrameIndex) to indicate that that frame is already in the dst. Options.fZeroInitialized is ignored in this case.

If set to kNoFrame, the codec will decode any necessary required frame(s) first.

Options.fSubset

If not NULL, represents a subset of the original image to decode. Must be within the bounds returned by getInfo(). If the EncodedFormat is EncodedImageFormat.kWEBP (the only one which currently supports subsets), the top and left values must be even.

In getPixels and incremental decode, we will attempt to decode the exact rectangular subset specified by fSubset.

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 getScanlines().

Options.fZeroInitialized