Table of Contents

Method ImEncode

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImEncode(string, InputArray, out byte[], ImageEncodingParam[]?)

Compresses the image and stores it in the memory buffer

public static bool ImEncode(string ext, InputArray img, out byte[] buf, ImageEncodingParam[]? prms = null)

Parameters

ext string

The file extension that defines the output format

img InputArray

The image to be written

buf byte[]

Output buffer resized to fit the compressed image.

prms ImageEncodingParam[]

Format-specific parameters.

Returns

bool