Click or drag to resize

Cv2ImEncode Method (String, InputArray, Byte, ImageEncodingParam)

Compresses the image and stores it in the memory buffer

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static void ImEncode(
	string ext,
	InputArray img,
	out byte[] buf,
	params ImageEncodingParam[] prms
)

Parameters

ext
Type: SystemString
The file extension that defines the output format
img
Type: OpenCvSharpInputArray
The image to be written
buf
Type: SystemByte
Output buffer resized to fit the compressed image.
prms
Type: OpenCvSharpImageEncodingParam
Format-specific parameters.
See Also