summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/im_convert.h9
-rw-r--r--include/im_image.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/include/im_convert.h b/include/im_convert.h
index 114786b..794eed9 100644
--- a/include/im_convert.h
+++ b/include/im_convert.h
@@ -66,6 +66,7 @@ enum imCastMode
* See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode.
*
* \verbatim im.ConvertDataType(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim im.ConvertDataTypeNew(image: imImage, data_type: number, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number, new_image: imImage [in Lua 5] \endverbatim
* \ingroup convert */
int imConvertDataType(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode);
@@ -73,25 +74,29 @@ int imConvertDataType(const imImage* src_image, imImage* dst_image, int cpx2real
* CMYK can be converted to RGB only, and it is a very simple conversion. \n
* All colors can be converted to Binary, the non zero gray values are converted to 1. \n
* RGB to Map uses the median cut implementation from the free IJG JPEG software, copyright Thomas G. Lane. \n
+ * Alpha channel is considered and Transparency* attributes are converted to alpha channel. \n
* All other color space conversions assume sRGB and CIE definitions. \n
* Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes.
*
* \verbatim im.ConvertColorSpace(src_image: imImage, dst_image: imImage) -> error: number [in Lua 5] \endverbatim
+ * \verbatim im.ConvertColorSpaceNew(image: imImage, color_space: number, has_alpha: boolean) -> error: number, new_image: imImage [in Lua 5] \endverbatim
* \ingroup convert */
int imConvertColorSpace(const imImage* src_image, imImage* dst_image);
/** Converts the image to its bitmap equivalent,
* uses \ref imConvertColorSpace and \ref imConvertDataType. \n
* Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes.
- * See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode.
+ * See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode. \n
+ * The function im.ConvertToBitmapNew uses the default convertion result from \ref imColorModeToBitmap if color_space is nil.
*
* \verbatim im.ConvertToBitmap(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim im.ConvertToBitmapNew(image: imImage, color_space: number, has_alpha: boolean, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number, new_image: imImage [in Lua 5] \endverbatim
* \ingroup convert */
int imConvertToBitmap(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode);
/** Returns an OpenGL compatible data buffer. Also returns the correspondant pixel format. \n
* The memory allocated is stored in the attribute "GLDATA" with BYTE type. And it will exists while the image exists. \n
- * It can also be cleared setting the attribute to NULL. \n
+ * It can be cleared by setting the attribute to NULL. \n
* MAP images are converted to RGB, and BINARY images are converted to GRAY.
* Alpha channel is considered and Transparency* attributes are converted to alpha channel.
* So calculate depth from glformat, not from image depth.
diff --git a/include/im_image.h b/include/im_image.h
index 7438f11..09de54b 100644
--- a/include/im_image.h
+++ b/include/im_image.h
@@ -169,7 +169,7 @@ const void* imImageGetAttribute(const imImage* image, const char* attrib, int *d
void imImageGetAttributeList(const imImage* image, char** attrib, int *attrib_count);
/** Sets all image data to zero. But if color space is YCBCR, LAB or LUV, and data type is BYTE or USHORT, then
- * data is initialized with 128 or 32768 accordingly.
+ * data is initialized with 128 or 32768 accordingly. Alpha is initialized as transparent (0).
*
* \verbatim image:Clear() [in Lua 5] \endverbatim
* \ingroup imgclass */