[arrayfire] 166/248: Doc for loadImageT and saveImageT
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.
commit 35111ba312a2b6642bfb8b12315ce4fbb0163bc2
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Fri Oct 30 14:36:37 2015 -0400
Doc for loadImageT and saveImageT
---
include/af/image.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 55 insertions(+), 3 deletions(-)
diff --git a/include/af/image.h b/include/af/image.h
index eef3185..8bec94d 100644
--- a/include/af/image.h
+++ b/include/af/image.h
@@ -98,7 +98,16 @@ AFAPI void deleteImageMem(void *ptr);
#if AF_API_VERSION >= 32
/**
- C++ Interface for loading an image as is original type
+ C++ Interface for loading an image as its original type
+
+ This load image function allows you to load images as u8, u16 or f32
+ depending on the type of input image as shown by the table below.
+
+ Bits per Color (Gray/RGB/RGBA Bits Per Pixel) | Array Type | Range
+ -----------------------------------------------|-------------|---------------
+ 8 ( 8/24/32 BPP) | u8 | 0 - 255
+ 16 (16/48/64 BPP) | u16 | 0 - 65535
+ 32 (32/96/128 BPP) | f32 | 0 - 1
\param[in] filename is name of file to be loaded
\return image loaded as \ref af::array()
@@ -112,11 +121,28 @@ AFAPI array loadImageT(const char* filename);
/**
C++ Interface for saving an image without modifications
+ 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
+
\param[in] filename is name of file to be saved
\param[in] in 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.
- \ingroup imageio_func_load
+ \ingroup imageio_func_save
*/
AFAPI void saveImageT(const char* filename, const array& in);
#endif
@@ -718,6 +744,15 @@ extern "C" {
/**
C Interface for loading an image as is original type
+ This load image function allows you to load images as u8, u16 or f32
+ depending on the type of input image as shown by the table below.
+
+ Bits per Color (Gray/RGB/RGBA Bits Per Pixel) | Array Type | Range
+ -----------------------------------------------|-------------|---------------
+ 8 ( 8/24/32 BPP) | u8 | 0 - 255
+ 16 (16/48/64 BPP) | u16 | 0 - 65535
+ 32 (32/96/128 BPP) | f32 | 0 - 1
+
\param[in] filename is name of file to be loaded
\return \ref AF_SUCCESS if successful
@@ -730,13 +765,30 @@ extern "C" {
/**
C Interface for saving an image without modifications
+ 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
+
\param[in] filename is name of file to be saved
\param[in] in 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.
\return \ref AF_SUCCESS if successful
- \ingroup imageio_func_load
+ \ingroup imageio_func_save
*/
AFAPI af_err af_save_image_t(const char* filename, const af_array in);
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list