Impact Acquire SDK .NET
TImageBufferPixelFormatExtension Class Reference

Additional methods to extend the functionality of the mv.impact.acquire.TImageBufferPixelFormat enumeration. More...

Static Public Member Functions

static TImageDestinationPixelFormat asImageDestinationPixelFormat (this TImageBufferPixelFormat imageBufferPixelFormat)
 Converts a mv.impact.acquire.TImageBufferPixelFormat to a mv.impact.acquire.TImageDestinationPixelFormat value.
 
static System.Drawing.Imaging.PixelFormat asSystemDrawingImagingPixelFormat (this TImageBufferPixelFormat imageBufferPixelFormat)
 Converts a mv.impact.acquire.TImageBufferPixelFormat to a System.Drawing.Imaging.PixelFormat value.
 

Detailed Description

Additional methods to extend the functionality of the mv.impact.acquire.TImageBufferPixelFormat enumeration.

Member Function Documentation

◆ asImageDestinationPixelFormat()

static TImageDestinationPixelFormat asImageDestinationPixelFormat ( this TImageBufferPixelFormat imageBufferPixelFormat)
inlinestatic

◆ asSystemDrawingImagingPixelFormat()

static System.Drawing.Imaging.PixelFormat asSystemDrawingImagingPixelFormat ( this TImageBufferPixelFormat imageBufferPixelFormat)
inlinestatic

Converts a mv.impact.acquire.TImageBufferPixelFormat to a System.Drawing.Imaging.PixelFormat value.

This extension function will allow mv.impact.acquire.TImageBufferPixelFormat values to be converted into the corresponding System.Drawing.Imaging.PixelFormat values that can e.g. be used to create instances of System.Drawing.Bitmap if the target platform supports this. See Efficiently create System.Drawing.Bitmap instances as well.

Attention
The outcome of this function mainly depends on the capabilities of your target environment. E.g. for .NET Standard without an installed System.Drawing.Common library as well as for some pixel formats when running with Mono, this function will throw a System.ArgumentException.
When working with System.Drawing.Imaging.PixelFormat.Format8bppIndexed a custom palette needs to be defined when working with grey-scale images.

Valid values for mv.impact.acquire.TImageBufferPixelFormat that can be converted into a into System.Drawing.Imaging.PixelFormat types and their corresponding values are:

Parameters
[in]imageBufferPixelFormatThe mv.impact.acquire.TImageBufferPixelFormat to convert