IDS peak ICV v1.5.0
Loading...
Searching...
No Matches
ImageWriter Class Reference

Public Member Functions

void Write (string filePath, Image image)
 Saves the specified image to a file.
 

Detailed Description

Provides functionality to write images to files in various supported formats.

Since
IDSImaging.Peak.ICV 1.3

Member Function Documentation

◆ Write()

void Write ( string filePath,
Image image )
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
  • HDR (.hdr) – High Dynamic Range

Compression settings:

  • JPEG: 75% quality
  • PNG: 100% quality

Supported pixel formats per image format

BMP:

  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • RGB8
  • RGBa8
  • BGR8
  • BGRa8
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGR8
  • BayerGR10
  • BayerGR12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • Confidence8
  • Confidence16
  • Coord3D_C8
  • Coord3D_C16

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
  • Coord3D_C8
  • Coord3D_C16
Note
When saving BGR formats to PNG, they are written as RGB.

TIFF:

  • BayerGR8
  • BayerGR10
  • BayerGR12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • Confidence8
  • Confidence16
  • Coord3D_C8
  • Coord3D_C16
  • Coord3D_C32f
  • Coord3D_ABC32f
  • RGB8
  • RGB10
  • RGB12
  • Mono32fIDS
  • RGB32fIDS
  • Mono32f
  • RGB32f
Note
When saving floating‑point images to TIFF: Not all image viewers support displaying TIFF files that store floating‑point pixel data. The saved TIFF file is intended primarily as a data container that allows this library to reliably write and later re‑read the data.

JPEG:

  • Mono8
  • RGB8
  • RGBa8
  • BGR8
  • BGRa8
  • BayerRG8
  • BayerGR8
  • BayerBG8
  • BayerGB8

RAW:

  • BayerGR8
  • BayerGR10
  • BayerGR12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • Confidence8
  • Confidence16
  • Coord3D_C8
  • Coord3D_C16
  • RGB8
  • RGB10
  • RGB12
  • BGR8
  • BGR10
  • BGR12
  • RGBa8
  • RGBa10
  • RGBa12
  • BGRa8
  • BGRa10
  • BGRa12

HDR:

  • Mono32f
  • RGB32f
Parameters
filePathThe path of the file to write to, as a UTF-8 encoded string.
imageThe image to save.
Exceptions
IcvNotSupportedExceptionThe specified file extension or pixel format is not supported.
IcvIOExceptionThe specified file path is invalid or the user lacks write permissions.
Since
IDSImaging.Peak.ICV 1.3