[−][src]Function arrayfire::save_image_native
pub fn save_image_native<T>(filename: String, input: &Array<T>) where
T: HasAfEnum + ImageNativeType,
Save an Array without modifications to an image file
This function only accepts U8, U16, F32 arrays. These arrays are saved to images without any modifications. You must also note that note all image type support 16 or 32 bit images. The best options for 16 bit images are PNG, PPM and TIFF. The best option for 32 bit images is TIFF. These allow lossless storage.
The images stored have the following properties:
Array Type | Bits per Color (Gray/RGB/RGBA Bits Per Pixel) | Range |
---|---|---|
U8 | 8 ( 8/24/32 BPP) | 0 - 255 |
U16 | 16 (16/48/64 BPP) | 0 - 65535 |
F32 | 32 (32/96/128 BPP) | 0 - 1 |
Parameters
filename
is name of file to be savedinput
is the Array to be saved. Should be U8 for saving 8-bit image, U16 for 16-bit image, and F32 for 32-bit image.