ImageExtensionsSaveAsGif(Image, Stream, Boolean) Method

Note: This API is now obsolete.
Saves the specified image as a GIF image.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 8.1.0
C#
[ObsoleteAttribute("This overload is kept for compatibility reasons. Use the SaveAsGif(Image, Stream, IQuantizer, IDitherer) overload instead.")]
public static void SaveAsGif(
	this Image image,
	Stream stream,
	bool allowDithering
)

Parameters

image  Image
The image to save. If image contains multiple images other than animated GIF frames, then only the current image will be saved.
stream  Stream
The stream to save the image into.
allowDithering  Boolean
to allow dithering high color images using a fix palette; otherwise, . This parameter is optional.
Default value: .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Image. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method is kept for compatibility reasons only and calls the SaveAsGif(Image, Stream, IQuantizer, IDitherer) overload with the SystemDefault8BppPalette quantizer.

This method no longer relies on the dithering logic of the built-in GIF encoder. Instead, the ditherer is obtained by the ErrorDiffusionDitherer.FloydSteinberg property if allowDithering is .

See Also