#include <peak_icv/io/peak_icv_image_writer.hpp>
|
| void | Write (const std::string &filePath, const Image &image) const |
| | Saves the specified image to a file.
|
| |
Provides functionality to write images to files in various supported formats.
- Since
- ids_peak_icv 1.0
Definition at line 30 of file peak_icv_image_writer.hpp.
◆ Write()
| void Write |
( |
const std::string & | filePath, |
|
|
const Image & | image ) const |
|
inline |
Saves the specified image to a file.
The file format is determined by the specified file extension of the file name.
Supported image formats (with required file extensions):
- PNG (.png) – Portable Network Graphics
- BMP (.bmp) – Bitmap
- JPEG (.jpeg) – Joint Photographic Experts Group
- TIFF (.tiff) – Tag Image File Format
- RAW (.raw) – Raw Binary Format
- Note
- The file extension of the specified file name must match the chosen image format. Mismatched extensions will cause an error on saving.
Compression settings:
- JPEG: 75% quality
- PNG: 100% quality
Supported pixel formats per image format
BMP:
-
Mono8
-
Mono10
-
Mono12
-
Mono16
-
RGB8
-
RGBa8
-
RGB10p32
-
BGR8
-
BGRa8
-
BGR10p32
|
-
BayerRG8
-
BayerRG10
-
BayerRG12
-
BayerGR8
-
BayerGR10
-
BayerGR12
-
BayerBG8
-
BayerBG10
-
BayerBG12
-
BayerGB8
|
-
BayerGB10
-
BayerGB12
-
Confidence8
-
Confidence16
-
Coord3D_C8
-
Coord3D_C16
|
JPEG:
-
Mono8
-
RGB8
-
RGBa8
-
BGR8
-
BGRa8
-
BayerRG8
-
BayerGR8
-
BayerBG8
-
BayerGB8
|
PNG:
-
Mono8
-
Mono10
-
Mono12
-
Mono16
-
RGB8
-
RGB10
-
RGB12
-
RGBa8
-
RGBa10
-
RGBa12
|
-
BGR8
-
BGR10
-
BGRa8
-
BGR12
-
BGRa10
-
BGRa12
-
BayerRG8
-
BayerRG10
-
BayerRG12
-
BayerGR8
|
-
BayerGR10
-
BayerGR12
-
BayerBG8
-
BayerBG10
-
BayerBG12
-
BayerGB8
-
BayerGB10
-
BayerGB12
-
Confidence8
-
Confidence16
|
|
TIFF:
-
Mono8
-
Mono10
-
Mono12
-
Mono16
-
RGB8
-
RGB10
-
RGB12
-
BayerRG8
-
BayerRG10
-
BayerRG12
|
-
BayerGR8
-
BayerGR10
-
BayerGR12
-
BayerBG8
-
BayerBG10
-
BayerBG12
-
BayerGB8
-
BayerGB10
-
BayerGB12
-
Confidence8
|
-
Confidence16
-
Coord3D_C8
-
Coord3D_C16
-
Coord3D_C32f
-
Coord3D_ABC32f
|
RAW:
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
- Parameters
-
| [in] | filePath | The path of the file to write to, as a UTF-8 encoded string. |
| [in] | image | The image to save. |
- Exceptions
-
- Since
- ids_peak_icv 1.0
Definition at line 240 of file peak_icv_image_writer.hpp.