WrappedImageFromGreyPixels Method

CVB.Net Documentation
Wraps, without copying, the given monochrome pixel buffer in a Image.

Namespace:  Stemmer.Cvb
Assembly:  Stemmer.Cvb (in Stemmer.Cvb.dll) Version: 14.0.0.0
Syntax

public static WrappedImage FromGreyPixels(
	IntPtr buffer,
	int bufferSize,
	int width,
	int height,
	PixelDataType dataType,
	int bitDepth,
	int pixelStride,
	int lineStride
)

Parameters

buffer
Type: SystemIntPtr
Pointer to the start of the pixel buffer.
bufferSize
Type: SystemInt32
Size of the buffer in bytes.
width
Type: SystemInt32
Width of the image in pixels.
height
Type: SystemInt32
Height of the image in pixels.
dataType
Type: Stemmer.CvbPixelDataType
Pixel data type.
bitDepth
Type: SystemInt32
Bits per pixel per plane.
pixelStride
Type: SystemInt32
Distance in bytes between two neighbouring pixels of the same plane, i.e. 1 for normal Mono8 images.
lineStride
Type: SystemInt32
Distance in bytes between two neighbouring lines of the same plane, i.e. width + optional padding for Mono8 images.

Return Value

Type: WrappedImage
Newly created image.
Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionWhen the dataType, bitDepth combination is invalid.
Remarks

This method does not add memory pressure as the memory is managed elsewhere.
See Also

Reference