IDS peak ICV v1.3.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

Definition at line 13 of file ImageWriter.cs.

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

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
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
  • Coord3D_C32f
  • Coord3D_ABC32f
  • YUV420_8_YY_UV_SemiplanarIDS
  • YUV420_8_YY_VU_SemiplanarIDS
  • YUV422_8_UYVY
  • RGB8
  • RGB10
  • RGB12
  • BGR8
  • BGR10
  • BGR12
  • RGBa8
  • RGBa10
  • RGBa12
  • BGRa8
  • BGRa10
  • BGRa12
  • BayerBG10p
  • BayerBG12p
  • BayerGB10p
  • BayerGB12p
  • BayerGR10p
  • BayerGR12p
  • BayerRG10p
  • BayerRG12p
  • Mono10p
  • Mono12p
  • RGB10p32
  • BGR10p32
  • BayerRG10g40IDS
  • BayerGB10g40IDS
  • BayerGR10g40IDS
  • BayerBG10g40IDS
  • BayerRG12g24IDS
  • BayerGB12g24IDS
  • BayerGR12g24IDS
  • BayerBG12g24IDS
  • Mono10g40IDS
  • Mono12g24IDS
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

Definition at line 87 of file ImageWriter.cs.