KGySoft.Drawing.Imaging Namespace

The KGySoft.Drawing.Imaging namespace provides advanced imaging functionality such as low-level bitmap data access for any pixel format, interfaces for quantization and dithering along with some built-in implementations, etc.
See the Remarks section of the KGySoft.Drawing namespace for details about the available KGy SOFT Drawing packages and their covered namespaces.

Classes

AnimatedGifConfiguration Represents the configuration for encoding a GIF animation by the GifEncoder.EncodeAnimation method.
BitmapDataExtensions Provides extension methods for the IReadableBitmapData, IWritableBitmapData and IReadWriteBitmapData types.
BitmapDataFactory Provides factory methods to create IReadWriteBitmapData instances.
ColorExtensions Contains extension methods for various color types representing colors.
ColorSpaceHelper A helper class containing low-level conversion methods for byte, ushort and float types to convert color components using the sRGB and linear color spaces.
CustomBitmapDataConfig Represents the configuration of a non-indexed custom bitmap data that can be created by the CreateBitmapData methods that have a CustomBitmapDataConfig parameter.
CustomBitmapDataConfigBase Represents the base class of a bitmap data configuration for custom pixel formats.
CustomIndexedBitmapDataConfig Represents the configuration of an indexed custom bitmap data that can be created by the CreateBitmapData methods that have a CustomIndexedBitmapDataConfig parameter.
DithererExtensions Contains extension methods for the IDitherer type.
ErrorDiffusionDitherer Provides an IDitherer implementation for error diffusion dithering. Use the static properties of this class to use predefined error diffusion filters or the constructor to create a custom one.
GifEncoder Provides an encoder for GIF image format that supports animation. Use the static members for high-level access or create an instance to control everything manually.
InterleavedGradientNoiseDitherer Provides an IDitherer implementation for applying an interleaved gradient noise pattern to the dithered result. For other noise-like ditherers see the OrderedDitherer.BlueNoise property and the RandomNoiseDitherer class.
KnownPixelFormatExtensions Contains extension methods for the KnownPixelFormat type.
OptimizedPaletteQuantizer Represents a quantizer that can generate an optimized set of colors best matching to the original image. Use the static methods to retrieve an instance. For using predefined colors see the PredefinedColorsQuantizer class.
OrderedDitherer Provides an IDitherer implementation for dithering patterns that are based on an ordered matrix. Use the static properties of this class to use predefined patterns or the constructor to create a custom ordered ditherer.
Palette Represents an indexed set of colors and provides efficient color lookup with caching. To create an instance use the static methods or the constructors.
PredefinedColorsQuantizer Represents a quantizer with predefined set of colors. Use the static members to retrieve an instance. For using optimized colors for a specific source image see the OptimizedPaletteQuantizer class.
See the Remarks section of the static methods of this class for details and image examples.
QuantizerExtensions Contains extension methods for the IQuantizer type.
RandomNoiseDitherer Provides an IDitherer implementation for random noise dithering. This class applies a random white noise to the result. For other noise-like ditherers see the OrderedDitherer.BlueNoise property and the InterleavedGradientNoiseDitherer class.
ReadableBitmapDataExtensions Provides extension methods for the IReadableBitmapData type.

Structures

Color32 Represents a 32-bit sRGB color where every color channel is represented by a 8-bit integer. It represents the same color space as the Color structure does but in a more optimized way for better performance and smaller memory consumption.
Color64 Represents a 64-bit sRGB color where every color channel is represented by a 16-bit integer.
ColorF Represents a 128-bit linear (not gamma-corrected) color where every color channel is represented by a 32-bit floating point value.
PColor32 Represents a 32-bit premultiplied sRGB color where every color channel is represented by a 8-bit integer.
PColor64 Represents a 64-bit premultiplied sRGB color where every color channel is represented by a 16-bit integer.
PColorF Represents a 128-bit premultiplied linear (not gamma-corrected) color where every color channel is represented by a 32-bit floating point value.
PixelFormatInfo Represents a pixel format in a technology-agnostic way. Can be used to specify custom pixel formats for the CreateBitmapData method overloads with a PixelFormatInfo, CustomBitmapDataConfig or CustomIndexedBitmapDataConfig parameter.

Interfaces

IBitmapData Represents the raw data of a bitmap. To create a managed instance use the BitmapDataFactory class. To obtain a readable or writable instance for platform specific bitmaps you can either use the specific GetReadableBitmapData, GetWritableBitmapData or GetReadWriteBitmapData extension methods when applicable (see the Remarks section of the KGySoft.Drawing namespace for a list about the supported platforms). Otherwise, you can use the members of the BitmapDataFactory class to create a bitmap data for any managed or unmanaged preallocated buffer of any bitmap implementation.
See the Remarks section of the BitmapExtensions.GetReadWriteBitmapData method for details and code samples. That method is for the GDI+ Bitmap type but the main principles apply for all sources.
IBitmapDataRow Represents a single row of an IBitmapData instance. Reading or writing actual pixels is available via the derived interfaces of this type.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
IBitmapDataRowMovable Represents a single row of an IBitmapData instance that allows setting its position to any row. Reading or writing actual pixels is available via the derived interfaces of this type.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
ICustomBitmapDataRow Represents a low-level custom accessor to a bitmap data row.
ICustomBitmapDataRowT Represents a low-level custom accessor to a bitmap data row of specific element type.
IDitherer Represents a ditherer that can be used to dither the result of a quantizing session.
For built-in implementations see the OrderedDitherer, ErrorDiffusionDitherer, RandomNoiseDitherer and InterleavedGradientNoiseDitherer classes.
IDitheringSession Represents a disposable dithering session returned by the IDitherer.Initialize method that is used to dither the result of a quantizing session for a specific IReadableBitmapData source.
IPalette Represents the properties of a Palette instance that can be accessed from custom color lookup functions.
IQuantizer Represents a quantizer that can be used to reduce the number of colors of an image.
For built-in implementations see the PredefinedColorsQuantizer and OptimizedPaletteQuantizer classes.
IQuantizingSession Represents a disposable quantizing session returned by the IQuantizer.Initialize method that is used to quantize (reduce the colors) of a specific IReadableBitmapData source.
IReadableBitmapData Represents a readable IBitmapData instance. To create an instance use the BitmapDataFactory class or the GetReadableBitmapData extension methods for various platform dependent bitmap implementations.
See the Remarks section of the KGySoft.Drawing namespace for a list about the technologies with dedicated support.
See the Remarks section of the BitmapExtensions.GetReadWriteBitmapData method for details and code samples. That method is for the GDI+ Bitmap type but the main principles apply for all sources.
IReadableBitmapDataRow Provides a fast read-only access to a single row of an IReadableBitmapData.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
IReadableBitmapDataRowMovable Represents a single row of an IReadableBitmapData instance that allows setting its position to any row.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
IReadWriteBitmapData Represents an IBitmapData instance with read/write access. To create an instance use the BitmapDataFactory class or the GetReadWriteBitmapData extension methods for various platform dependent bitmap implementations.
See the Remarks section of the KGySoft.Drawing namespace for a list about the technologies with dedicated support.
See the Remarks section of the BitmapExtensions.GetReadWriteBitmapData method for details and code samples. That method is for the GDI+ Bitmap type but the main principles apply for all sources.
IReadWriteBitmapDataRow Provides a fast read-write access to a single row of an IReadWriteBitmapData.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
IReadWriteBitmapDataRowMovable Represents a single row of an IReadWriteBitmapData instance that allows setting its position to any row.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
IWritableBitmapData Represents a writable IBitmapData instance. To create an instance use the BitmapDataFactory class or the GetWritableBitmapData extension methods for various platform dependent bitmap implementations.
See the Remarks section of the KGySoft.Drawing namespace for a list about the technologies with dedicated support.
See the Remarks section of the BitmapExtensions.GetReadWriteBitmapData method for details and code samples. That method is for the GDI+ Bitmap type but the main principles apply for all sources.
IWritableBitmapDataRow Provides a fast write-only access to a single row of an IWritableBitmapData.
See the Remarks section of the GetReadWriteBitmapDatamethod for details and examples.
IWritableBitmapDataRowMovable Represents a single row of an IWritableBitmapData instance that allows setting its position to any row.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.

Enumerations

AnimationFramesSizeHandling Represents the strategy to be used with frames of different sizes.
AnimationMode Represents the looping mode of an animation.
AutoStrengthMode Represents the behavior of ditherers with configurable strength when auto strength is used.
See the Remarks section of the OrderedDitherer.ConfigureStrength method for more details and some examples regarding dithering strength.
GifCompressionMode Represents the compression behavior of the GifEncoder class.
GifGraphicDisposalMethod Indicates the way in which the graphic is to be treated after being displayed.
KnownPixelFormat Represents pixel formats with built-in support. For custom formats you can use the PixelFormatInfo type when applicable.
WorkingColorSpace Represents the preferred working color space for various operations such as alpha blending, measuring distance of colors, interpolation, quantizing, dithering and some other operations. The working color space can be specified independently from the color space of the actual pixel format of an IBitmapData instance.