![]() |
IDS peak comfortC v1.11.0
|
Typedefs | |
| typedef struct peak_imagewriter * | peak_imagewriter_handle |
| peak ImageWriter handle The value for an invalid ImageWriter handle is PEAK_INVALID_HANDLE. | |
Enumerations | |
| enum | papientitiy_imagefile_format { PEAK_IMAGEFILE_FORMAT_INVALID , PEAK_IMAGEFILE_FORMAT_PNG , PEAK_IMAGEFILE_FORMAT_JPEG , PEAK_IMAGEFILE_FORMAT_TIFF , PEAK_IMAGEFILE_FORMAT_BMP , PEAK_IMAGEFILE_FORMAT_RAW } |
| ImageWriter image file formats. More... | |
Functions | |
| peak_status | peak_IPL_ImageWriter_Create (peak_imagewriter_handle *hImageWriter) |
| Creates a new ImageWriter instance. | |
| peak_status | peak_IPL_ImageWriter_Destroy (peak_imagewriter_handle hImageWriter) |
| Destroys an ImageWriter instance. | |
| peak_status | peak_IPL_ImageWriter_Save (peak_imagewriter_handle hImageWriter, peak_frame_handle hFrame, const char *fileName) |
| Save the given frame. | |
| peak_status | peak_IPL_ImageWriter_Format_Set (peak_imagewriter_handle hImageWriter, papientitiy_imagefile_format imageFormat) |
| Sets an image file format for the ImageWriter instance. | |
| peak_status | peak_IPL_ImageWriter_Format_Get (peak_imagewriter_handle hImageWriter, papientitiy_imagefile_format *imageFormat) |
| Reads the currently set image file format from the ImageWriter instance. | |
| peak_status | peak_IPL_ImageWriter_Compression_Set (peak_imagewriter_handle hImageWriter, uint32_t compression) |
| Sets a compression for the ImageWriter instance. | |
| peak_status | peak_IPL_ImageWriter_Compression_Get (peak_imagewriter_handle hImageWriter, uint32_t *compression) |
| Reads the currently set compression ratio from the ImageWriter instance. | |
ImageWriter saves images to a file. Multiple ImageWriter objects can be configured to specify image file format and compression ratio.
The following image formats are supported:
The image is saved via peak_IPL_ImageWriter_Save with specified file path and file name.
It is also possible to save an image without the ImageWriter. See peak_Frame_Save for more information.
Not all image formats can be written to a Bitmap file. Supported image formats are:
Written as Mono:
Not all image formats can be written to a PNG file. Supported image formats are:
Written as Mono:
Written as RGB:
Not all image formats can be written to a TIFF file. Unsupported images formats are all packed image formats, YUV, all formats with alpha channel and all BGR pixel formats.
Not all image formats can be written to a JPEG file. Supported image formats are:
Written as Mono:
Writes the specified image to the filesystem as a raw binary image. This is supported for all non-packed pixel formats.
ImageWriter image file formats.
All currently supported image file formats that could be save via peak_IPL_ImageWriter_Save peak_Frame_Save
| peak_status peak_IPL_ImageWriter_Compression_Get | ( | peak_imagewriter_handle | hImageWriter, |
| uint32_t * | compression | ||
| ) |
Reads the currently set compression ratio from the ImageWriter instance.
Reads the compression ratio from the ImageWriter instance
| [in] | hImageWriter | The ImageWriter handle. |
| [out] | compression | The currently used image format. |
compression is an invalid pointer. hImageWriter is an invalid handle. | peak_status peak_IPL_ImageWriter_Compression_Set | ( | peak_imagewriter_handle | hImageWriter, |
| uint32_t | compression | ||
| ) |
Sets a compression for the ImageWriter instance.
Configures the ImageWriter instance to use the specified compression ratio in range of 0 (no compression) - 100 (maximum compression).
| [in] | hImageWriter | The ImageWriter handle. |
| [in] | compression | The new compression ratio to use. |
compression is an invalid value. hImageWriter is an invalid handle. | peak_status peak_IPL_ImageWriter_Create | ( | peak_imagewriter_handle * | hImageWriter | ) |
Creates a new ImageWriter instance.
| [out] | hImageWriter | Pointer to a handle for an ImageWriter receiving the instance handle. |
hImageWriter is an invalid pointer. | peak_status peak_IPL_ImageWriter_Destroy | ( | peak_imagewriter_handle | hImageWriter | ) |
Destroys an ImageWriter instance.
After the call, the handle is invalid.
| [in] | hImageWriter | The ImageWriter handle. |
hImageWriter is an invalid handle. hImageWriter is an invalid pointer. | peak_status peak_IPL_ImageWriter_Format_Get | ( | peak_imagewriter_handle | hImageWriter, |
| papientitiy_imagefile_format * | imageFormat | ||
| ) |
Reads the currently set image file format from the ImageWriter instance.
Reads the ImageWriter instance to use the specified image format to save images
| [in] | hImageWriter | The ImageWriter handle. |
| [out] | imageFormat | The currently used image format. |
imageFormat is an invalid pointer. hImageWriter is an invalid handle. | peak_status peak_IPL_ImageWriter_Format_Set | ( | peak_imagewriter_handle | hImageWriter, |
| papientitiy_imagefile_format | imageFormat | ||
| ) |
Sets an image file format for the ImageWriter instance.
Configures the ImageWriter instance to use the specified image format to save images
| [in] | hImageWriter | The ImageWriter handle. |
| [in] | imageFormat | The new image format to use. |
imageFormat is an invalid value. hImageWriter is an invalid handle. | peak_status peak_IPL_ImageWriter_Save | ( | peak_imagewriter_handle | hImageWriter, |
| peak_frame_handle | hFrame, | ||
| const char * | fileName | ||
| ) |
Save the given frame.
Write the given frame to the file system with the configured file format and compression ratio.
| [in] | hImageWriter | The ImageWriter handle. |
| [in] | hFrame | The frame handle. |
| [in] | fileName | The given file name to use as an utf-8 encoded string |
filePath is an invalid pointer. hImageWriter or hFrame is an invalid handle.