ImageExtensions Class

KGy SOFT Drawing Libraries Help
Contains extension methods for the Image type.
Inheritance Hierarchy

SystemObject
  KGySoft.DrawingImageExtensions

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

public static class ImageExtensions

The ImageExtensions type exposes the following members.

Methods

  NameDescription
Public methodStatic memberCode exampleConvertPixelFormat(Image, PixelFormat, IQuantizer, IDitherer)
Converts the specified image to a Bitmap with the desired PixelFormat.
See the Remarks section for details.
Public methodStatic memberCode exampleConvertPixelFormat(Image, PixelFormat, Color, Byte)
Converts the specified image to a Bitmap of the desired PixelFormat.
See the Remarks section for details and an example, as well as for information about the possible usable PixelFormats on different platforms.
Public methodStatic memberCode exampleConvertPixelFormat(Image, PixelFormat, Color, Color, Byte)
Converts the specified image to a Bitmap of the desired PixelFormat.
See the Remarks section for details and an example.
Public methodStatic memberDrawInto(Image, Bitmap, Point, IDitherer)
Draws the source Image into the target Bitmap. This method is similar to Graphics.DrawImage except that it never scales the image and that works between any pair of source and target PixelFormats. If target can represent a narrower set of colors, then the result will be automatically quantized to the colors of the target, and also an optional ditherer can be specified.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, Point, IDitherer)
Draws the source Image into the target Bitmap. This method is similar to Graphics.DrawImage except that it never scales the image and that works between any pair of source and target PixelFormats. If target can represent a narrower set of colors, then the result will be automatically quantized to the colors of the target, and also an optional ditherer can be specified.
See the Remarks section for details.
Public methodStatic memberEqualsByContent
Compares an image to another one by content and returns whether they are equal. Images of different size or pixel format are considered different.
Public methodStatic memberGetBitsPerPixel
Gets the bits per pixel (BPP) value of the image.
Public methodStatic memberCode exampleSaveAsBmp(Image, Stream)
Saves the specified image into a stream using the built-in BMP encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section for details and an example.
Public methodStatic memberSaveAsBmp(Image, String)
Saves the specified image to the specified file using the built-in BMP encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section of the SaveAsBmp(Image, Stream) overload for details and an example.
Public methodStatic memberSaveAsGif(Image, Stream, Boolean) Obsolete.
Saves the specified image as a GIF image.
Public methodStatic memberSaveAsGif(Image, Stream, Color) Obsolete.
Saves the specified image as a GIF image.
Public methodStatic memberSaveAsGif(Image, Stream, IQuantizer, IDitherer)
Saves the specified image using the built-in GIF encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section for details.
Public methodStatic memberSaveAsGif(Image, String, IQuantizer, IDitherer)
Saves the specified image to the specified file using the built-in GIF encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section of the SaveAsGif(Image, Stream, IQuantizer, IDitherer) overload for details.
Public methodStatic memberSaveAsIcon(IEnumerableImage, Stream, Boolean)
Saves the specified images as an Icon without relying on a built-in encoder in the operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat and does not save a PNG stream when no built-in Icon encoder can be found in the operating system.
See the Remarks section for details.
Public methodStatic memberSaveAsIcon(Image, Stream, Boolean)
Saves the specified image as an Icon without relying on a built-in encoder in the operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat and does not save a PNG stream when no built-in Icon encoder can be found in the operating system.
See the Remarks section for details.
Public methodStatic memberSaveAsIcon(Image, String, Boolean)
Saves the specified image as an Icon without relying on a built-in encoder in the operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat and does not save a PNG stream when no built-in Icon encoder can be found in the operating system.
See the Remarks section of the SaveAsIcon(Image, Stream, Boolean) overload for details.
Public methodStatic memberCode exampleSaveAsJpeg(Image, Stream, Int32)
Saves the specified image using the built-in JPEG encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section for details and an example.
Public methodStatic memberSaveAsJpeg(Image, String, Int32)
Saves the specified image to the specified file using the built-in JPEG encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section of the SaveAsJpeg(Image, Stream, Int32) overload for details and an example.
Public methodStatic memberSaveAsMultipageTiff
Saves the provided images as a multi-page TIFF into the specified Stream. When Image instances in images contain already multiple pages, only the current page is taken.
See the Remarks section for details.
Public methodStatic memberSaveAsPng(Image, Stream)
Saves the specified image using the built-in PNG encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section for details.
Public methodStatic memberSaveAsPng(Image, String)
Saves the specified image to the specified file using the built-in PNG encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section of the SaveAsPng(Image, Stream) overload for details.
Public methodStatic memberSaveAsTiff(Image, Stream, Boolean)
Saves the specified image using the built-in TIFF encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section for details.
Public methodStatic memberSaveAsTiff(Image, String, Boolean)
Saves the specified image to the specified file using the built-in TIFF encoder if available in the current operating system. Unlike the Save(Stream, ImageFormat) method, this one supports every PixelFormat.
See the Remarks section of the SaveAsTiff(Image, Stream, Boolean) overload for details.
Public methodStatic memberToGrayscale
Converts an image to a grayscale one.
See the Remarks section for details.
Public methodStatic memberToIcon(Image, Color)
Creates an Icon from an Image.
Public methodStatic memberToIcon(Image, Int32, Boolean)
Creates an Icon from an Image.
Top
See Also

Reference