GifEncoderEncodeAnimation Method
Encodes the frames of the specified configuration as an animated GIF image and writes it into the specified stream.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.2.0
public static void EncodeAnimation(
AnimatedGifConfiguration configuration,
Stream stream
)
Public Shared Sub EncodeAnimation (
configuration As AnimatedGifConfiguration,
stream As Stream
)
public:
static void EncodeAnimation(
AnimatedGifConfiguration^ configuration,
Stream^ stream
)
static member EncodeAnimation :
configuration : AnimatedGifConfiguration *
stream : Stream -> unit
Parameters
- configuration AnimatedGifConfiguration
- An AnimatedGifConfiguration instance describing the configuration of the encoding.
- stream Stream
- The stream to save the encoded animation into.
This method adjusts the degree of parallelization automatically, blocks the caller, and does not support cancellation or reporting progress. Use the
BeginEncodeAnimation
or
EncodeAnimationAsync (in .NET Framework 4.0 and above) methods for asynchronous call and to set up cancellation or for reporting progress.
To encode Image instances with default configuration you can use the ImageExtensions.SaveAsAnimatedGif
methods that provide a higher level access.
To create an animation completely manually you can create a GifEncoder instance that provides a lower level access.