Meziantou.Framework.Imaging namespace

Classes

NameDescription
AutoCropAnalysisThe result of ImageProcessingExtensions.AnalyzeAutoCrop: the background and the content box detected in an image.
AutoCropAnalysis<TPixel>The result of ImageProcessingExtensions.AnalyzeAutoCrop: the background, as a pixel of the image, and the content box detected in an Image<TPixel>.
AutoCropOptionsImmutable options for ImageProcessingExtensions.AutoCrop and ImageProcessingExtensions.AnalyzeAutoCrop.
AutoLevelsOptionsImmutable options of a contrast stretch (ImageProcessingExtensions.AutoLevels).
AuxiliaryImageAn image stored next to the primary image of a file: a thumbnail, a depth map, a gain map, a matte. It is borrowed from its AuxiliaryImageCollection, and decoded on demand by AuxiliaryImage.Decode.
AuxiliaryImageCollectionThe images that a file stores next to its primary image without presenting them: the thumbnails, depth maps, gain maps and mattes of HEIC and AVIF files, and the images that follow the primary image of a JPEG Multi-Picture Format file (the gain map of an Ultra HDR photo). Image.Load never reads them.
CmykConversionOptionsImmutable options of the color conversion that loads images whose samples are CMYK inks (four-component JPEG files and separated TIFF pages): see ImageDecodeOptions.CmykConversion and ImageReaderOptions.CmykConversion.
ColorDifferenceColor difference metrics (ΔE): how different two colors look, as a distance in CIELAB or Oklab. A difference of about 1 in CIELAB (about 0.02 in Oklab) is just noticeable.
ColorMatrixAn immutable matrix that gives each pixel a new color from its own one: brighter, grayer, tinted, inverted, more transparent. It is applied to an image by ImageProcessingExtensions.ApplyColorMatrix, and to a drawing by DrawingCanvas.Filter.
ColorsThe named colors of CSS, as opaque Rgba32 values (and Colors.Transparent). A color converts implicitly to an Rgba64 and to a brush.
ConvolutionKernelAn immutable convolution matrix for ImageProcessingExtensions.Convolve.
ConvolutionOptionsImmutable options for ImageProcessingExtensions.Convolve.
CropSuggestionOptionsImmutable options of ImageProcessingExtensions.SuggestCrop.
CubeLutAn immutable color lookup table read from a .cube file, for ImageProcessingExtensions.ApplyLut: the color grades and film looks that video and photo tools export.
DifferenceMapOptionsImmutable options of ImageSimilarity.CreateDifferenceMap.
FrameRefinementDescribes a rendering of a frame that ImageReader<TPixel>.ReadFrameRefinementInto wrote to an image: an intermediate rendering, computed from the part of the frame that was received, or the frame itself.
HdrToneMappingOptionsImmutable options of the conversion of high dynamic range samples (the PQ and HLG transfer characteristics of a CICP color description) to the standard dynamic range that an ICC profile describes (IccColorTransformOptions.ToneMapping).
HistogramEqualizationOptionsImmutable options of a histogram equalization (ImageProcessingExtensions.Equalize).
IccColorTransformAn ICC color conversion from the device color space of a source profile to the device color space of a destination profile. Instances are immutable and thread-safe: create a transform once and reuse it.
IccColorTransformOptionsImmutable options of an ICC color conversion (IccColorTransform).
ImageAn owned, disposable image made of one or more full-canvas displayed frames sharing one pixel format.
ImageCollectionA disposable collection of images that are not animation frames: the pages of a document (TIFF, BigTIFF) or the alternative representations of a drawing (ICO, CUR). Entries may differ in size, pixel format and metadata, and are never resized or converted implicitly.
ImageCollectionEntryOne entry of an ImageCollection: a page of a document or an alternative representation of a drawing.
ImageConfigurationImmutable configuration shared by an image and the operations performed on it.
ImageDecodeOptionsImmutable options for the eager Image.Load and Image.LoadAsync methods.
ImageExceptionThe base class of the exceptions describing image content, feature and resource-limit failures.
ImageFormatInfoDescribes an ImageFormat: its display name, its media (MIME) types and its file extensions, and maps an extension or a media type back to its format.
ImageFrameA borrowed view of one full-canvas displayed frame (or of the poster frame) of an Image.
ImageFrameCollectionThe read-only, ordered list of the displayed frames of an Image. Never empty.
ImageFrameCollection<TPixel>The typed, read-only, ordered list of the displayed frames of an Image<TPixel>. Never empty.
ImageFrame<TPixel>A borrowed, typed view of one full-canvas displayed frame (or of the poster frame) of an Image<TPixel>.
ImageHistogramAn immutable histogram of one channel of the pixels of an image or a frame (ImageProcessingExtensions.ComputeHistogram): the number of pixels at each sample level.
ImageIdentifyOptionsImmutable options for the Image.Identify and Image.IdentifyAsync methods.
ImageInfoA snapshot of the information that can be determined about an encoded image without decoding its pixels.
ImagePaletteAn immutable palette of 1 to 256 colors with 8-bit samples and straight alpha, for a color reduction (QuantizeOptions.Palette). Build one from the pixels of frames with PaletteBuilder, or list the colors.
ImageProcessingExtensionsIn-place processing operations on images and frames.
ImageReaderOptionsImmutable options for Image.OpenReader.
ImageReader<TPixel>Decodes the displayed frames of an image sequentially, with memory bounded by one frame of compositor state.
ImageResourceLimitExceptionThe exception thrown when an operation would exceed a configured ImageResourceLimits value.
ImageResourceLimitsImmutable resource limits applied while decoding, processing and encoding images.
ImageSimilarityMeasures how similar two frames look: the Structural Similarity Index (SSIM), the peak signal-to-noise ratio (PSNR), the SSIMULACRA 2 score and the Butteraugli distance, and the distance between two 64-bit perceptual hashes, the difference hash (dHash) and the perceptual hash (pHash); and draws where two frames differ.
ImageSimilarityOptionsImmutable options of ImageSimilarity.ComputeSsim and ImageSimilarity.ComputePsnr: the precision of the samples they compare.
ImageWriterOptionsImmutable options for Image.CreateWriter.
ImageWriter<TPixel>Encodes frames sequentially, keeping only bounded private state between frames.
Image<TPixel>An owned, disposable image whose frames store pixels of type TPixel.
InvalidImageContentExceptionThe exception thrown when the data of a recognized format is malformed, inconsistent, or truncated.
JpegXlTranscodeOptionsImmutable options for JpegXlTranscoder.
JpegXlTranscoderConverts between JPEG files and JPEG XL files without decoding pixels: a JPEG XL file can hold the quantized coefficients of a JPEG file, about a fifth smaller, with the data that rebuild the JPEG file byte for byte.
OpenExrDecodingOptionsImmutable options of the OpenEXR decoder (ImageConfiguration.OpenExrDecoding): the channels it decodes and the window the image covers.
PaletteBuilderComputes one palette from the pixels of one or more frames, for example a palette shared by every frame of an animation (QuantizeOptions.Palette).
PixelConversionOptionsImmutable options controlling explicit conversions between pixel formats (typed loading and Image.CloneAs).
PixelFormatsProvides information about the built-in pixel formats and maps pixel structs to PixelFormat values.
QuantizeOptionsImmutable options of a color reduction to a palette: by ImageProcessingExtensions.Quantize, and by the encoders that store a palette (GifEncoder.Quantization, BmpEncoder.Quantization and PngEncoder.Quantization).
RadialBlurOptionsImmutable options for ImageProcessingExtensions.RadialBlur.
ResizeOptionsImmutable options for ImageProcessingExtensions.Resize.
RgbColorSpaceThe meaning of red, green and blue values: how the color value types (CieXyz, CieLab, Oklab, ...) read an Rgba32 or Rgba64 color and write one. Instances are immutable and thread-safe: create one once and reuse it.
StructuringElementAn immutable structuring element: the neighborhood of a pixel that the morphological filters read (ImageProcessingExtensions.Erode, ImageProcessingExtensions.Dilate and the operations made of them). It is flat: every pixel of the neighborhood counts the same.
ThresholdOptionsImmutable options of a binarization (ImageProcessingExtensions.Threshold): how the threshold of each pixel is chosen, and the two colors of the result.
ToneCurveAn immutable tone curve: a function that gives a new value to a sample value, for ImageProcessingExtensions.ApplyToneCurve and ImageProcessingExtensions.ApplyToneCurves.
TransformOptionsImmutable options of the transformations of an image: ImageProcessingExtensions.Rotate, ImageProcessingExtensions.Skew and ImageProcessingExtensions.Transform.
UnknownImageFormatExceptionThe exception thrown when the input does not start with the signature of a supported image format.
UnsupportedImageFeatureExceptionThe exception thrown when valid content uses a feature this version does not support (for example a lossless JPEG or a GIF plain-text extension), or when an operation would lose information (animation, alpha, precision, metadata, color profile) and no explicit policy allows the loss.

Structs

NameDescription
A8An 8-bit alpha (coverage) value without color, for alpha masks.
Abgr32A pixel with 8-bit components and straight (non-premultiplied) alpha, stored in ABGR byte order.
AffineTransformA transformation of the plane that keeps straight lines straight and parallel lines parallel: a combination of translations, scalings, rotations and skews.
Argb32A pixel with 8-bit components and straight (non-premultiplied) alpha, stored in ARGB byte order.
Bgr565An opaque pixel with a 5-bit red, a 6-bit green and a 5-bit blue component, packed in a 16-bit value.
Bgra32A pixel with 8-bit components and straight (non-premultiplied) alpha, stored in BGRA byte order.
ButteraugliDistanceThe Butteraugli distance between two frames (ImageSimilarity.ComputeButteraugliDistance): the two values that libjxl's butteraugli_main prints.
CieLabA color in the CIE 1976 L*a*b* color space (CIELAB), relative to a white, CieXyz.D50 by default.
CieLchA color in the cylindrical form of CIELAB (CIELCh): its lightness, chroma and hue angle.
CieLuvA color in the CIE 1976 L*u*v* color space (CIELUV), relative to a white, CieXyz.D50 by default.
CieXyzA color in the CIE 1931 XYZ color space: the tristimulus values X, Y (the luminance) and Z.
CmykA device CMYK color: the amounts of cyan, magenta, yellow and black inks, without color profile.
FrameDurationAn exact, non-negative frame display duration expressed as a normalized rational number of seconds.
Gray16An opaque 16-bit grayscale pixel, stored in native endianness.
Gray8An opaque 8-bit grayscale pixel.
HslA color given by its hue, saturation and lightness (HSL), a cylindrical form of the encoded RGB values of a device.
HsvA color given by its hue, saturation and value (HSV, also called HSB), a cylindrical form of the encoded RGB values of a device.
HwbA color given by its hue, whiteness and blackness (HWB), a cylindrical form of the encoded RGB values of a device.
ImageFrameCollection.EnumeratorEnumerates the frames of an ImageFrameCollection.
ImageFrameCollection<TPixel>.EnumeratorEnumerates the frames of an ImageFrameCollection<TPixel>.
La16A pixel with an 8-bit gray level and an 8-bit straight (non-premultiplied) alpha component, stored in that byte order.
La32A pixel with a 16-bit gray level and a 16-bit straight (non-premultiplied) alpha component, stored in native endianness.
OklabA color in Oklab, the perceptual color space of Björn Ottosson, in which equal distances are close to equal perceived differences: the space CSS Color 4 recommends to mix colors in.
OklchA color in the cylindrical form of Oklab: its lightness, chroma and hue angle.
PixelAccessor<TPixel>Scoped access to the rows of a frame, valid only during a ImageFrame<TPixel>.ProcessPixelRows callback.
PixelBytesAccessorScoped access to the raw bytes of the rows of a frame, valid only during a ImageFrame.ProcessPixelBytes callback.
PointRepresents a pixel coordinate. The origin is the top-left corner of the stored pixels; Y grows downward.
PointDRepresents a position with sub-pixel precision. The origin is the top-left corner of the stored pixels; Y grows downward. Integer coordinates are pixel boundaries: the pixel (x, y) covers the square from (x, y) to (x + 1, y + 1).
ProjectiveTransformA transformation of the plane that keeps straight lines straight, but not parallel lines parallel: a plane seen in perspective. An AffineTransform is the projective transformation whose third column is (0, 0, 1).
RectangleRepresents an axis-aligned rectangle of pixels with exclusive Rectangle.Right and Rectangle.Bottom bounds.
RectangleDRepresents an axis-aligned rectangle with sub-pixel precision (see PointD for the coordinate system).
Rgb24An opaque pixel with 8-bit red, green and blue components, stored in RGB byte order.
Rgb48An opaque pixel with 16-bit red, green and blue components, stored in native endianness.
Rgba1010102A pixel with 10-bit red, green and blue components and a 2-bit straight (non-premultiplied) alpha, packed in a 32-bit value.
Rgba32A pixel with 8-bit red, green, blue and straight (non-premultiplied) alpha components, stored in RGBA byte order.
Rgba64A pixel with 16-bit red, green, blue and straight (non-premultiplied) alpha components.
RgbaFloatA pixel with single-precision floating-point red, green, blue and straight (non-premultiplied) alpha components, for scene-referred and high dynamic range data.
RgbaHalfA pixel with half-precision floating-point red, green, blue and straight (non-premultiplied) alpha components, for scene-referred and high dynamic range data stored in 8 bytes per pixel.
SizeRepresents a non-negative two-dimensional size, in pixels.
Transform3DA transformation of space, as the 4x4 matrices of CSS transforms: translations, scalings and rotations in three dimensions, and perspective. A drawing is the plane z = 0; Transform3D.ToProjectiveTransform gives what the transformation does to it.

Enums

NameDescription
AutoCropPaddingModeSelects what an auto-crop does when the padding around the content reaches outside the canvas.
AuxiliaryImageKindWhat an image stored next to the primary image of a file is (AuxiliaryImage.Kind).
Cie94ApplicationThe weighting of the CIE 1994 color difference (ColorDifference.DeltaE94), which depends on the kind of samples compared.
ColorBlindnessTypeA color vision deficiency simulated by ColorMatrix.CreateColorBlindness.
ConvolutionEdgeModeSelects the pixels a convolution reads outside the image.
ConvolutionWorkingSpaceSelects the numeric space in which convolution arithmetic is performed.
CropEnergyWhat ImageProcessingExtensions.SuggestCrop keeps in the crop.
DecodingStrictnessSelects how the decoders treat files that deviate from their specification (ImageConfiguration.DecodingStrictness).
DifferenceMapKindWhat the image of ImageSimilarity.CreateDifferenceMap shows.
DitheringModeSelects how colors are dithered when they are reduced to a palette, by ImageProcessingExtensions.Quantize and by the encoders that reduce colors (QuantizeOptions.Dithering).
EdgeDetectorSelects the operator of ImageProcessingExtensions.DetectEdges.
FlipModeThe axis of a mirror operation.
GamutMappingHow an ICC color conversion brings the colors that the destination cannot reproduce into its gamut (IccColorTransformOptions.GamutMapping).
HdrToneMappingOperatorSelects the curve that compresses the highlights of high dynamic range samples into a standard dynamic range (HdrToneMappingOptions).
HistogramChannelThe sample a histogram counts (ImageProcessingExtensions.ComputeHistogram).
HistogramColorModeThe samples a histogram-based tone operation (ImageProcessingExtensions.Equalize, ImageProcessingExtensions.AutoLevels) remaps.
HistogramEqualizationModeThe algorithm of a histogram equalization (HistogramEqualizationOptions.Mode).
HueInterpolationThe arc of the hue circle along which two hues are interpolated, as the hue-interpolation-method of CSS Color 4 (section 12.4) selects it.
ImageCollectionKindWhat the entries of an ImageCollection are.
ImageColorModelDescribes the color model of the encoded source samples, independently of the decoded PixelFormat.
ImageFormatIdentifies an encoded image file format.
ImageIdentifyModeControls how much of an encoded image is examined by Image.Identify.
ImageResourceLimitKindIdentifies the resource limit that was exceeded. Each value corresponds to a property of ImageResourceLimits.
LutInterpolationSelects how a three-dimensional lookup table (CubeLut) is interpolated between its points.
OpenExrWindowModeSelects the pixels an OpenEXR file is decoded to (OpenExrDecodingOptions.WindowMode).
OutOfRangeSampleHandlingSelects what happens to the floating-point samples (RgbaFloat, RgbaHalf) that a narrower pixel format cannot store: the samples outside [0, 1] of an integer format, and the finite samples beyond the range of Half (±65,504).
PixelFormatIdentifies one of the built-in working pixel representations used to store decoded pixels.
RadialBlurKindThe direction in which ImageProcessingExtensions.RadialBlur blurs every pixel.
ResamplingFilterSelects the interpolation kernel used to resample pixels.
ResizeAnchorSelects the part of the image kept when ResizeMode.Cover crops the overflow, or where the image is placed on a larger canvas (ResizeMode.Pad, ResizeMode.BoxPad, ImageProcessingExtensions.ExtendCanvas).
ResizeModeControls how the target size of a resize is interpreted.
ResizeWorkingSpaceSelects the numeric space in which resampling arithmetic is performed.
RotateModeA clockwise rotation by a multiple of 90 degrees. Rotations are exact pixel permutations, never resampling.
SimilarityPrecisionThe samples that ImageSimilarity compares, whatever the pixel formats of the frames.
ThresholdMethodSelects how ImageProcessingExtensions.Threshold chooses the threshold of each pixel.
TransformCanvasModeSelects the canvas of a transformed image (TransformOptions.CanvasMode).

Delegates

NameDescription
PixelBytesActionA callback receiving scoped access to the raw pixel bytes of a frame.
PixelBytesAction<TState>A callback receiving scoped access to the raw pixel bytes of a frame and caller state.
PixelRowsAction<TPixel>A callback receiving scoped access to the pixel rows of a frame.
PixelRowsAction<TPixel, TState>A callback receiving scoped access to the pixel rows of a frame and caller state.