Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvBufferWriter Class Reference

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...
 
PvBufferConverterGetConverter ()
 Returns a reference to the internal buffer converter. More...
 

Detailed Description

Saves the contents of a PvBuffer object to a raw data file or bitmap.

To save an image buffer to disk:

  1. Acquire an image. See PvBuffer.
  2. Create an image save. Use PvBufferWriter::PvBufferWriter.
  3. Save the image to disk. Use Store.

Member Function Documentation

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.

Returns
The internal buffer converter.
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.

Parameters
[in]aBufferThe image to save.
[in]aFilenameThe 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]aTypeThe format of the image; a PvBufferFormatType enumeration.
[out]aBytesWrittenIf not NULL (default) contains the number of bytes effectively written when storing the buffer.
Returns
Includes:

The documentation for this class was generated from the following files:

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com