ImageExtensions Class

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

SystemObject
  KGySoft.DrawingImageExtensions

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

public static class ImageExtensions

The ImageExtensions type exposes the following members.

Methods

  NameDescription
Public methodStatic memberBeginConvertPixelFormat(Image, PixelFormat, IQuantizer, IDitherer, AsyncConfig)
Begins to convert the specified image to a Bitmap of the desired PixelFormat asynchronously.
See the Remarks section for details.
Public methodStatic memberBeginConvertPixelFormat(Image, PixelFormat, Color, Byte, AsyncConfig)
Begins to convert the specified image to a Bitmap of the desired PixelFormat asynchronously.
See the Remarks section for details.
Public methodStatic memberBeginConvertPixelFormat(Image, PixelFormat, Color, Color, Byte, AsyncConfig)
Begins to convert the specified image to a Bitmap of the desired PixelFormat asynchronously.
See the Remarks section for details.
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 memberConvertPixelFormatAsync(Image, PixelFormat, IQuantizer, IDitherer, TaskConfig)
Converts the specified image to a Bitmap of the desired PixelFormat asynchronously.
See the Remarks section for details.
Public methodStatic memberConvertPixelFormatAsync(Image, PixelFormat, Color, Byte, TaskConfig)
Converts the specified image to a Bitmap of the desired PixelFormat asynchronously.
See the Remarks section for details.
Public methodStatic memberConvertPixelFormatAsync(Image, PixelFormat, Color, Color, Byte, TaskConfig)
Converts the specified image to a Bitmap of the desired PixelFormat asynchronously.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Point, IDitherer)
Draws the source Image into the target Bitmap without scaling. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, ScalingMode)
Draws the source Image into the target Bitmap with possible scaling. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Point, IQuantizer, IDitherer)
Draws the source Image into the target Bitmap without scaling. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, IDitherer, ScalingMode)
Draws the source Image into the target Bitmap with possible scaling. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, Point, IDitherer)
Draws the source Image into the target Bitmap without scaling. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, Rectangle, ScalingMode)
Draws the source Image into the target Bitmap with possible scaling. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, IQuantizer, IDitherer, ScalingMode)
Draws the source Image into the target Bitmap with possible scaling. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, Point, IQuantizer, IDitherer)
Draws the source Image into the target Bitmap without scaling. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, Rectangle, IDitherer, ScalingMode)
Draws the source Image into the target Bitmap with possible scaling. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering.
See the Remarks section for details.
Public methodStatic memberDrawInto(Image, Bitmap, Rectangle, Rectangle, IQuantizer, IDitherer, ScalingMode)
Draws the source Image into the target Bitmap with possible scaling. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering.
See the Remarks section for details.
Public methodStatic memberEndConvertPixelFormat
Waits for the pending asynchronous operation started by the BeginConvertPixelFormat methods to complete. In .NET 4.0 and above you can use the ConvertPixelFormatAsync methods instead.
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
Returns a new Image, which is the grayscale version of the specified image.
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.
Public methodStatic memberToIcon(Image, Int32, ScalingMode, Boolean)
Creates an Icon from an Image.
Top
See Also

Reference