◆ readImage() [1/2]
Load a PNG image from the filesystem.
Will return a nullptr on error.
- Parameters
-
| filename | Path to the PNG file on the local filesystem to load from. |
| outTextChunks | Optional output parameter to store key-value text chunks present in the PNG file. |
◆ readImage() [2/2]
Load a PNG image from a ByteBuffer.
Will return a nullptr on error.
- Parameters
-
| buffer | Memory buffer containing a valid PNG file structure to load from. |
| outTextChunks | Optional output parameter to store key-value text chunks present in the PNG file. |
◆ writeImage() [1/2]
Save a PNG image to the filesystem.
Note: If the type of image is Image::FLOAT or image.shift() != 0.0 or its image.scale() != 1.0, image will be normalized using ImageProcessing::Normalization::ValueRange before it is converted to PNG. Otherwise, no normalization is performed.
- Parameters
-
| filename | Path to the PNG file on the local filesystem to be created. |
| image | Image to save |
| compression | Compression level. Valid values range from 0-9, corresponding directly to the zlib compression levels (0 - no compression, 9 - "maximal" compression). |
- Returns
- Whether the operation was successful
◆ writeImage() [2/2]
Save a PNG image to a ByteBuffer.
Note: If the type of image is Image::FLOAT or image.shift()!=0.0 or its image.scale()!=1.0, image will be normalized using ImageProcessing::Normalization::ValueRange before it is converted to PNG. Otherwise, no normalization is performed.
- Parameters
-
| image | Image to save |
| compression | Compression level. Valid values range from 0-9, corresponding directly to the zlib compression levels (0 - no compression, 9 - "maximal" compression). |
- Returns
- nullptr on error
The documentation for this class was generated from the following file: