Supported input image formats defined by the pixel type:
Mono1packed
Mono2packed
Mono4packed
Mono8
Mono10
Mono10packed
Mono10p
Mono12
Mono12packed
Mono12p
Mono16
BayerGR8
BayerRG8
BayerGB8
BayerBG8
BayerGR10
BayerRG10
BayerGB10
BayerBG10
BayerGR12
BayerRG12
BayerGB12
BayerBG12
BayerGR12Packed
BayerRG12Packed
BayerGB12Packed
BayerBG12Packed
BayerGR12p
BayerRG12p
BayerGB12p
BayerBG12p
BayerGR16
BayerRG16
BayerGB16
BayerBG16
RGB8packed
BGR8packed
RGBA8packed
BGRA8packed
GB10packed
BGR10packed
RGB12packed
BGR12packed
RGB12V1packed
RGB16packed
RGB8planar
RGB16planar
YUV422packed
YUV422_YUYV_Packed
Supported output image formats defined by the pixel type:
BGRA8packed - This pixel type can be used in Windows bitmaps.
BGR8packed - This pixel type can be used in Windows bitmaps.
RGB8packed
RGB16packed
RGB8planar
RGB16planar
Mono8
Mono16
All input image formats can be converted to all output image formats.
RGB, BGR and Bayer image formats are converted to monochrome formats by using the following formula: C++
mono=(0.25*red)+(0.625*green)+(0.125*blue);
YUV formats are converted to 16 bit bit depth in an intermediate conversion step. This is why the output is always aligned at the most significant bit when converting to 16 bit color output formats like RGB16packed.
Limitations: The last column of an YUV input image with odd width cannot be converted. The last column and the last row of a Bayer input image cannot be converted. The default treatment of rows and columns that cannot be converted due to their location on edges can be controlled using the @PixelDataConverter/InconvertibleEdgeHandling parameter. For more information, see the Convert() method description.
Thread Safety: The PixelDataConverter class is not thread-safe.
The image is converted to the destination image according to the current converter settings. The padding area of a row in the destination image is set to zero.
Preconditions:
The format of the source image must be supported by the converter.
The destination image buffer must be large enough to hold the destination image.
The source image buffer and the destination image buffer must not be identical.
Thread Safety: This method is not thread-safe.
Error Safety: Throws an exception if the passed parameters are not valid. The converter object is still valid after an error.
Type: System.Int32 The number of pixels in a row in the source image.
sourceHeight
Type: System.Int32 The number of rows in the source image.
sourcePaddingX
Type: System.Int32 The number of extra data bytes at the end of each row. The default value is usually 0.
sourceOrientation
Type: Basler.Pylon.ImageOrientation The vertical orientation of the source image in the image buffer. The default value is usually ImageOrientation.TopDown.
The image is converted to the destination image according to the current converter settings. The padding area of a row in the destination image is set to zero.
Preconditions:
The source buffer parameters must point to a valid image.
The format of the source image must be supported by the converter.
The destination image buffer must be large enough to hold the destination image.
The source image buffer and the destination image buffer must not be identical.
The sourceWidth value must be >= 0.
The sourceHeight value must be >= 0.
The sourcePaddingX value must be >= 0.
Thread Safety: This method is not thread-safe.
Error Safety: Throws an exception if the passed parameters are not valid. The converter object is still valid after an error.
Type: System.Int32 The number of pixels in a row in the source image.
sourceHeight
Type: System.Int32 The number of rows in the source image.
sourcePaddingX
Type: System.Int32 The number of extra data bytes at the end of each row. The default value is usually 0.
sourceOrientation
Type: Basler.Pylon.ImageOrientation The vertical orientation of the source image in the image buffer. The default value is usually ImageOrientation.TopDown.
The image is converted to the destination image according to the current converter settings. The padding area of a row in the destination image is set to zero.
Preconditions:
The source buffer parameters must point to a valid image.
The format of the source image must be supported by the converter.
The destination image buffer must be large enough to hold the destination image.
The source image buffer and the destination image buffer must not be identical.
The sourceWidth value must be >= 0.
The sourceHeight value must be >= 0.
The sourcePaddingX value must be >= 0.
Thread Safety: This method is not thread-safe.
Error Safety: Throws an exception if the passed parameters are not valid. The converter object is still valid after an error.
The image is converted to the destination image according to the current converter settings. The padding area of a row in the destination image is set to zero.
Preconditions:
The format of the source image must be supported by the converter.
The destination image buffer must be large enough to hold the destination image.
The source image buffer and the destination image buffer must not be identical.
Thread Safety: This method is not thread-safe.
Error Safety: Throws an exception if the passed parameters are not valid. The converter object is still valid after an error.
Type: System.Int32 The number of pixels in a row in the source image.
sourceHeight
Type: System.Int32 The number of rows in the source image.
sourcePaddingX
Type: System.Int32 The number of extra data bytes at the end of each row. The default value is usually 0.
sourceOrientation
Type: Basler.Pylon.ImageOrientation The vertical orientation of the source image in the image buffer. The default value is usually ImageOrientation.TopDown.
The image is converted to the destination image according to the current converter settings. The padding area of a row in the destination image is set to zero.
Preconditions:
The source buffer parameters must point to a valid image.
The format of the source image must be supported by the converter.
The destination image buffer must be large enough to hold the destination image.
The source image buffer and the destination image buffer must not be identical.
The sourceWidth value must be >= 0.
The sourceHeight value must be >= 0.
The sourcePaddingX value must be >= 0.
Thread Safety: This method is not thread-safe.
Error Safety: Throws an exception if the passed parameters are not valid. The converter object is still valid after an error.
Type: System.Int32 The number of pixels in a row in the source image.
sourceHeight
Type: System.Int32 The number of rows in the source image.
sourcePaddingX
Type: System.Int32 The number of extra data bytes at the end of each row. The default value is usually 0.
sourceOrientation
Type: Basler.Pylon.ImageOrientation The vertical orientation of the source image in the image buffer. The default value is usually ImageOrientation.TopDown.
The image is converted to the destination image according to the current converter settings. The padding area of a row in the destination image is set to zero.
Preconditions:
The source buffer parameters must point to a valid image.
The format of the source image must be supported by the converter.
The destination image buffer must be large enough to hold the destination image.
The source image buffer and the destination image buffer must not be identical.
The sourceWidth value must be >= 0.
The sourceHeight value must be >= 0.
The sourcePaddingX value must be >= 0.
Thread Safety: This method is not thread-safe.
Error Safety: Throws an exception if the passed parameters are not valid. The converter object is still valid after an error.
Type: Int64 The size of the destination image when converting the given source image using current converter settings. Use ToInt32(Int64) to convert to 32 bit if necessary.
Type: Int64 The size of the destination image when converting the source image using current converter settings. Use ToInt32(Int64) to convert to 32 bit if necessary.
Error Safety: Throws an exception if OutputPixelFormat is set to an unsupported or invalid PixelFormat. The converter object is still valid after an error.