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, a lower resolution level. 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, the images that follow the primary image of a JPEG Multi-Picture Format file (the gain map of an Ultra HDR photo), the preview image and the lower resolution levels (mipmaps, ripmaps) of an OpenEXR file, and the previews, transparency masks, depth maps and semantic masks of a DNG file. Image.Load never reads them.
CannyEdgeOptionsImmutable options of the Canny edge detector (ImageProcessingExtensions.DetectCannyEdges): the blur that removes the noise, and the two thresholds of the hysteresis.
CieLabConversionOptionsImmutable options of the color conversion that loads images whose samples are CIE 1976 L*a*b* colors (TIFF pages with the CIELab, ICCLab and ITULab photometric interpretations): see ImageDecodeOptions.CieLabConversion and ImageReaderOptions.CieLabConversion.
CmykConversionOptionsImmutable options of the color conversion that loads images whose samples are CMYK inks (four-component JPEG files, separated TIFF pages, CMYK JPEG 2000 files and JPEG XL files with a black channel): see ImageDecodeOptions.CmykConversion and ImageReaderOptions.CmykConversion.
CmykPixelConversionOptionsImmutable options of the color conversion between CMYK pixels (Cmyk32, Cmyk64) and the other pixel formats: see PixelConversionOptions.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.
CornerDetectionOptionsImmutable options of ImageProcessingExtensions.DetectCorners.
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.
CustomImageCodecThe base class of the codecs of the formats the library does not read or write itself. Register a codec in ImageConfiguration.Codecs to detect, identify, load and save its format through the entry points of the built-in formats.
CustomImageDecodeContextThe context of one call to CustomImageCodec.Decode or CustomImageCodec.Identify: the configuration and the request of the operation, and the factory of the decoded images.
DifferenceMapOptionsImmutable options of ImageSimilarity.CreateDifferenceMap.
DngRawImageThe raw image of a DNG file before it is demosaiced: the samples it stores (the values of the sensor, a color filter array or linear raw data), the parameters that map them to linear reference values (DNG specification 1.7.1, chapter 5), and those values. Image.Load renders the same samples to an image; this type gives what precedes the demosaicing, which does not depend on the algorithm of a reader.
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).
HomographyEstimateThe result of ProjectiveTransform.EstimateHomographyRobust: the homography and the correspondences it explains.
HomographyRansacOptionsImmutable options of ProjectiveTransform.EstimateHomographyRobust.
HoughLineOptionsImmutable options of ImageProcessingExtensions.DetectLines.
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).
IccNamedColorA color of an ICC named color profile: its name, its colorimetry and the device values that reproduce it.
IccNamedColorCollectionThe colors of an ICC named color profile, in the order of the profile, and their lookup by name.
IccNamedColorTransformThe conversion of the colors of an ICC named color profile to the device values of another profile, through a sequence of profiles. Instances are immutable and thread-safe: create a transform once and reuse it.
ImageAn owned, disposable image made of one or more full-canvas displayed frames sharing one pixel format.
ImageBufferAllocatorProvides the byte arrays the library uses for pixels, decoders, encoders and scratch memory, in place of the process-wide pool (ImageBufferPool), for the images and operations of a configuration (ImageConfiguration.BufferAllocator).
ImageBufferPoolThe settings of the process-wide pool of the buffers the library rents for pixels, decoders, encoders and scratch memory.
ImageCollectionA disposable collection of images that are not animation frames: the pages of a document (TIFF, BigTIFF, Netpbm), the alternative representations of a drawing (ICO, CUR), or the surfaces of a texture (DDS, KTX 2.0: mipmap levels, cube map faces, array elements and depth slices). 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, an alternative representation of a drawing, or a surface of a texture.
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.
InpaintingOptionsImmutable options of ImageProcessingExtensions.Inpaint.
InvalidImageContentExceptionThe exception thrown when the data of a recognized format is malformed, inconsistent, or truncated.
Jpeg2000DecodingOptionsImmutable options of the JPEG 2000 decoder (ImageConfiguration.Jpeg2000Decoding): the quality layers it decodes.
JpegXlLayerA layer of a JpegXlLayeredImage: an image of any size, at a position on the canvas, combined with the layers below it with a blend mode, and an optional name.
JpegXlLayeredImageA still JPEG XL image made of layers: images of any size, each at a position on the canvas, combined from the bottom one up with the blend modes of the format, and named. Image.Load reads the image the layers make, as a viewer shows it; this type reads and writes the layers themselves.
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 part and the channels it decodes, the window the image covers, and how deep data become pixels.
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.
PixelMaskA set of pixels of an image: the region to fill of ImageProcessingExtensions.Inpaint, or the regions to keep and to remove of ImageProcessingExtensions.SeamCarve.
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.
SeamCarvingOptionsImmutable options of ImageProcessingExtensions.SeamCarve.
SkewEstimationOptionsImmutable options of ImageProcessingExtensions.EstimateSkew and ImageProcessingExtensions.Deskew.
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.
TextureSurfaceWhere an entry of a ImageCollectionKind.TextureSurfaces collection is in its texture: the element of the array, the face of the cube map, the mipmap level and the depth slice.
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.
Cmyk32An opaque pixel with 8-bit cyan, magenta, yellow and black ink amounts.
Cmyk64An opaque pixel with 16-bit cyan, magenta, yellow and black ink amounts, stored in native endianness.
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.
GrayFloatAn opaque grayscale pixel with a single-precision floating-point gray level, in 4 bytes per pixel.
GrayHalfAn opaque grayscale pixel with a half-precision floating-point gray level, in 2 bytes per pixel.
HoughLineA straight line found by ImageProcessingExtensions.DetectLines, in normal form: the points (x, y) with x cos θ + y sin θ = ρ.
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.
ImageCornerA corner found by ImageProcessingExtensions.DetectCorners: a pixel and the strength of its response.
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.
LaFloatA pixel with a single-precision floating-point gray level and a straight (non-premultiplied) alpha component, in 8 bytes per pixel.
LaHalfA pixel with a half-precision floating-point gray level and a straight (non-premultiplied) alpha component, in 4 bytes per pixel.
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.
PixelRowSource<TPixel>Read-only access to the rows of a frame as they were before a neighborhood operation, valid only during IPixelNeighborhoodOperation<TPixel>.Invoke.
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.

Interfaces

NameDescription
ICustomPixel<TSelf>Defines a pixel type of the application that the library reads and writes through one of its built-in pixel formats, its storage format.
IImageProcessor<TPixel>A custom image processor that computes each frame of a new canvas, possibly of another size, from the whole frame before the operation (a crop, a warp, a content-aware resize, ...), applied to every frame of an image transactionally by ImageProcessingExtensions.ApplyProcessor.
IPixelNeighborhoodOperation<TPixel>A custom image processor that computes each row from the unmodified pixels of the frame (a neighborhood filter, such as a blur or an edge detector), applied to every frame of an image by ImageProcessingExtensions.ApplyNeighborhoodOperation.
IPixelRowOperation<TPixel>A custom image processor that edits each row of pixels in place, applied to every frame of an image by ImageProcessingExtensions.ApplyRowOperation.

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.
CornerDetectionMethodThe corner detectors of ImageProcessingExtensions.DetectCorners.
CropEnergyWhat ImageProcessingExtensions.SuggestCrop keeps in the crop.
CubeMapFaceA face of a cube map, in the order Direct3D stores them.
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.
JpegXlBlendModeHow a layer of a JPEG XL image (JpegXlLayer) is combined with the layers below it: the blend modes of the format (ISO/IEC 18181-1, section F.2). The color channels and the alpha channel use the same mode.
LutInterpolationSelects how a three-dimensional lookup table (CubeLut) is interpolated between its points.
OpenExrDeepDataModeSelects how the pixels of an OpenEXR deep image are decoded (OpenExrDecodingOptions.DeepData).
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
CustomPixelRowAction<TPixel>Processes one row of the pixels of a frame, converted to a custom pixel type (ICustomPixel<TSelf>).
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.