ImageExtensionsSaveAsGif(Image, Stream, Color) 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,
	Color[]? palette
)

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.
palette  Color
The desired custom palette to use. If , and a palette cannot be taken from the source image, then a default palette will be used.

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 a quantizer obtained by the PredefinedColorsQuantizer.FromCustomPalette method.

See Also