summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/im_convertcolor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/im_convertcolor.cpp b/src/im_convertcolor.cpp
index 8e96ccc..e68730f 100644
--- a/src/im_convertcolor.cpp
+++ b/src/im_convertcolor.cpp
@@ -2,7 +2,7 @@
* \brief Image Conversion
*
* See Copyright Notice in im_lib.h
- * $Id: im_convertcolor.cpp,v 1.2 2009/08/18 02:23:33 scuri Exp $
+ * $Id: im_convertcolor.cpp,v 1.3 2009/08/18 05:13:18 scuri Exp $
*/
#include "im.h"
@@ -963,6 +963,8 @@ int imConvertColorSpace(const imImage* src_image, imImage* dst_image)
imbyte* transp_color = (imbyte*)imImageGetAttribute(src_image, "TransparencyColor", NULL, NULL);
if (transp_color)
iConvertSetTranspColor((imbyte**)dst_image->data, dst_image->count, *(transp_color+0), *(transp_color+1), *(transp_color+2));
+ else
+ memset(dst_image->data[3], 255, dst_image->count);
}
else
{
@@ -973,6 +975,8 @@ int imConvertColorSpace(const imImage* src_image, imImage* dst_image)
iConvertSetTranspMap((imbyte*)src_image->data[0], (imbyte*)dst_image->data[3], dst_image->count, transp_map, transp_count);
else if (transp_index)
iConvertSetTranspIndex((imbyte*)src_image->data[0], (imbyte*)dst_image->data[3], dst_image->count, *transp_index);
+ else
+ memset(dst_image->data[3], 255, dst_image->count);
}
}