GifEncoderEncodeAnimation Method

KGy SOFT Drawing Libraries Help
Encodes the frames of the specified configuration as an animated GIF image and writes it into the specified stream.
See the Remarks section for details.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 7.0.0-preview.2
Syntax

public static void EncodeAnimation(
	AnimatedGifConfiguration configuration,
	Stream stream
)

Parameters

configuration
Type: KGySoft.Drawing.ImagingAnimatedGifConfiguration
An AnimatedGifConfiguration instance describing the configuration of the encoding.
stream
Type: System.IOStream
The stream to save the encoded animation into.
Exceptions

ExceptionCondition
ArgumentNullExceptionconfiguration or stream is .
ArgumentExceptionconfiguration is invalid.
Remarks

Note Note
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.

See Also

Reference