ImageExtensionsSaveAsGif Method (Image, Stream, Boolean)

KGy SOFT Drawing Libraries Help

Note: This API is now obsolete.

Saves the specified image as a GIF image.

Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.1.0
Syntax

[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
Type: System.DrawingImage
The image to save. If image contains multiple images other than animated GIF frames, then only the current image will be saved.
stream
Type: System.IOStream
The stream to save the image into.
allowDithering
Type: SystemBoolean
  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 method if allowDithering is .

See Also

Reference