Cv2ImEncode Method (String, InputArray, Byte, Int32) OpenCvSharp Class Library
Compresses the image and stores it in the memory buffer

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
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: OpenCvSharp.CPlusPlusInputArray
The image to be written
buf
Type: SystemByte

[Missing <param name="buf"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.ImEncode(System.String,OpenCvSharp.CPlusPlus.InputArray,System.Byte[]@,System.Int32[])"]

prms (Optional)
Type: SystemInt32

[Missing <param name="prms"/> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.ImEncode(System.String,OpenCvSharp.CPlusPlus.InputArray,System.Byte[]@,System.Int32[])"]

Return Value

Type: Boolean

[Missing <returns> documentation for "M:OpenCvSharp.CPlusPlus.Cv2.ImEncode(System.String,OpenCvSharp.CPlusPlus.InputArray,System.Byte[]@,System.Int32[])"]

See Also

Reference