[−][src]Function opencv::imgcodecs::imencode
pub fn imencode(
ext: &str,
img: &dyn ToInputArray,
buf: &mut VectorOfuchar,
params: &VectorOfint
) -> Result<bool>
Encodes an image into a memory buffer.
The function imencode compresses the image and stores it in the memory buffer that is resized to fit the result. See cv::imwrite for the list of supported formats and flags description.
Parameters
- ext: File extension that defines the output format.
- img: Image to be written.
- buf: Output buffer resized to fit the compressed image.
- params: Format-specific parameters. See cv::imwrite and cv::ImwriteFlags.
C++ default parameters
- params: std::vector
()