Click or drag to resize

Cv2ImEncode Method (String, InputArray, Byte, Int32)

Compresses the image and stores it in the memory buffer

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntax
public static bool ImEncode(
	string ext,
	InputArray img,
	out byte[] buf,
	int[] prms = null
)

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 (Optional)
Type: SystemInt32
Format-specific parameters.

Return Value

Type: Boolean
See Also