Image
(De)Serialize NDarray to/from PNG files.
Quick Start
Grayscale Images
Load
Greyscale images can be loaded into a floating point NDarray with values in the range [0, 1]:
let image: = load?;
Save
2D NDarrays can be saved as greyscale images:
image.save?;
Colour Images
Load
Similarly, colour images can be loaded into a 3D NDarray with values in the range [0, 1]. If the image has transparency (an alpha channel) there will be 4 channels, otherwise there will be 3:
let image: = load?;
Save
Colour images can be saved in the same way:
image.save?;