SKWebpEncoder.EncodeAnimated Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| EncodeAnimated(ReadOnlySpan<SKWebpEncoderFrame>, SKWebpEncoderOptions) |
Encodes the specified frames as an animated WebP and returns the result as SKData. |
| EncodeAnimated(SKWStream, ReadOnlySpan<SKWebpEncoderFrame>, SKWebpEncoderOptions) |
Encodes the specified frames as an animated WebP and writes the result to the specified stream. |
| EncodeAnimated(Stream, ReadOnlySpan<SKWebpEncoderFrame>, SKWebpEncoderOptions) |
Encodes the specified frames as an animated WebP and writes the result to the specified managed stream. |
EncodeAnimated(ReadOnlySpan<SKWebpEncoderFrame>, SKWebpEncoderOptions)
Encodes the specified frames as an animated WebP and returns the result as SKData.
public static SkiaSharp.SKData? EncodeAnimated(ReadOnlySpan<SkiaSharp.SKWebpEncoderFrame> frames, SkiaSharp.SKWebpEncoderOptions options);
Parameters
- frames
- ReadOnlySpan<SKWebpEncoderFrame>
A read-only span of SKWebpEncoderFrame values describing each frame of the animation.
- options
- SKWebpEncoderOptions
The WebP encoder options, such as quality and compression method.
Returns
A new SKData containing the encoded animated WebP data, or null if encoding failed.
Applies to
EncodeAnimated(SKWStream, ReadOnlySpan<SKWebpEncoderFrame>, SKWebpEncoderOptions)
Encodes the specified frames as an animated WebP and writes the result to the specified stream.
public static bool EncodeAnimated(SkiaSharp.SKWStream dst, ReadOnlySpan<SkiaSharp.SKWebpEncoderFrame> frames, SkiaSharp.SKWebpEncoderOptions options);
Parameters
- dst
- SKWStream
The stream to which the encoded animated WebP data is written.
- frames
- ReadOnlySpan<SKWebpEncoderFrame>
A read-only span of SKWebpEncoderFrame values describing each frame of the animation.
- options
- SKWebpEncoderOptions
The WebP encoder options, such as quality and compression method.
Returns
true if encoding succeeded; otherwise, false.
Applies to
EncodeAnimated(Stream, ReadOnlySpan<SKWebpEncoderFrame>, SKWebpEncoderOptions)
Encodes the specified frames as an animated WebP and writes the result to the specified managed stream.
public static bool EncodeAnimated(System.IO.Stream dst, ReadOnlySpan<SkiaSharp.SKWebpEncoderFrame> frames, SkiaSharp.SKWebpEncoderOptions options);
Parameters
- dst
- Stream
The managed stream to which the encoded animated WebP data is written.
- frames
- ReadOnlySpan<SKWebpEncoderFrame>
A read-only span of SKWebpEncoderFrame values describing each frame of the animation.
- options
- SKWebpEncoderOptions
The WebP encoder options, such as quality and compression method.
Returns
true if encoding succeeded; otherwise, false.