Saves the contents of a PvBuffer object to a raw data file or bitmap. More...
Public Member Functions | |
PvBufferWriter () | |
Constructor. | |
virtual | ~PvBufferWriter () |
Destructor. | |
PvResult | Store (PvBuffer *aBuffer, const PvString &aFilename, PvBufferFormatType aType=PvBufferFormatBMP, uint32_t *aBytesWritten=NULL) |
Saves a PvBuffer to disk. More... | |
PvBufferConverter & | GetConverter () |
Returns a reference to the internal buffer converter. More... | |
Saves the contents of a PvBuffer object to a raw data file or bitmap.
To save an image buffer to disk:
PvBufferConverter & PvBufferWriter::GetConverter | ( | ) |
Returns a reference to the internal buffer converter.
When writing the buffer to a file requires a conversion, it is performed automatically by the PvBufferWriter. The converter used for this operation can be configured using this method. As an example, a RGB filter could be set or the Bayer interpolation method could be selected.
PvResult PvBufferWriter::Store | ( | PvBuffer * | aBuffer, |
const PvString & | aFilename, | ||
PvBufferFormatType | aType = PvBufferFormatBMP , |
||
uint32_t * | aBytesWritten = NULL |
||
) |
Saves a PvBuffer to disk.
This method lets you save an image buffer (PvBuffer object) to disk in a variety of formats. If a conversion to color is required, it happens automatically within the Store method. If no conversion to the required color format is available, Store fails.
[in] | aBuffer | The image to save. |
[in] | aFilename | The filename, including extension. The format uses the same standard as the C fopen function. In C/C++, valid filenames include "myfile.raw", "..\\myfile.bmp", "C:\\myfile.bmp". |
[in] | aType | The format of the image; a PvBufferFormatType enumeration. |
[out] | aBytesWritten | If not NULL (default) contains the number of bytes effectively written when storing the buffer. |
Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com