Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image IO » SaveImageToBuffer

SaveImageToBuffer


Header: AVL.h
Namespace: avl
Module: FoundationLite

Saves an image to a file stored in ByteBuffer.

Applications: Use this filter if you want to send image file through I/O communication, e.g. through a TcpIp connection.

Syntax

C++
C#
 
void avl::SaveImageToBuffer
(
	const avl::Image& inImage,
	avl::ImageFileFormat::Type inImageFileFormat,
	avl::ByteBuffer& outBuffer
)

Parameters

Name Type Default Description
Input value inImage const Image& An image to be saved
Input value inImageFileFormat ImageFileFormat::Type Image file format
Output value outBuffer ByteBuffer& Buffer containing image file data

Description

This function saves an Image to a common format file similarly to SaveImage, but instead of accessing the file system it stores the file in the memory by writing its content to ByteBuffer.

The operation saves an image to file encoded in one of the standard image file formats. Currently the filter supports the following formats:

  • BMP (*.bmp)
  • JPEG (*.jpg, *jpeg)
  • PNG (*.png),
  • PNM (*.pbm, *.pgm, *.ppm, *.pnm),
  • TIFF (*.tif, *.tiff).

Because of the limitations of the standard image formats, the filter is capable of saving three-channel images of UInt8 pixel type for all formats, and UInt16 for supported formats only (PNG, TIFF). To alter the format of an image one can use the filters contained in the Image Conversions category.

See Also