summaryrefslogtreecommitdiff
path: root/src/process
diff options
context:
space:
mode:
authorscuri <scuri>2010-01-06 20:15:34 +0000
committerscuri <scuri>2010-01-06 20:15:34 +0000
commitf7cb3c864a65132c672da90a81627e49c98a1ca9 (patch)
tree61c2180524f77ffcf4c89e8aedecbd9a949ebfcf /src/process
parent0555ad520a43e046c7a5b71a116ddc72e4530142 (diff)
*** empty log message ***
Diffstat (limited to 'src/process')
-rw-r--r--src/process/im_color.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/process/im_color.cpp b/src/process/im_color.cpp
index b27d4b3..29933c4 100644
--- a/src/process/im_color.cpp
+++ b/src/process/im_color.cpp
@@ -2,7 +2,7 @@
* \brief Color Processing Operations
*
* See Copyright Notice in im_lib.h
- * $Id: im_color.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $
+ * $Id: im_color.cpp,v 1.2 2010/01/06 20:16:30 scuri Exp $
*/
#include <im.h>
@@ -142,7 +142,7 @@ void imProcessSplitComponents(const imImage* src_image, imImage** dst_image)
memcpy(dst_image[0]->data[0], src_image->data[0], src_image->plane_size);
memcpy(dst_image[1]->data[0], src_image->data[1], src_image->plane_size);
memcpy(dst_image[2]->data[0], src_image->data[2], src_image->plane_size);
- if (imColorModeDepth(src_image->color_space) == 4)
+ if (imColorModeDepth(src_image->color_space) == 4 || src_image->has_alpha)
memcpy(dst_image[3]->data[0], src_image->data[3], src_image->plane_size);
}
@@ -151,7 +151,7 @@ void imProcessMergeComponents(const imImage** src_image, imImage* dst_image)
memcpy(dst_image->data[0], src_image[0]->data[0], dst_image->plane_size);
memcpy(dst_image->data[1], src_image[1]->data[0], dst_image->plane_size);
memcpy(dst_image->data[2], src_image[2]->data[0], dst_image->plane_size);
- if (imColorModeDepth(dst_image->color_space) == 4)
+ if (imColorModeDepth(dst_image->color_space) == 4 || dst_image->has_alpha)
memcpy(dst_image->data[3], src_image[3]->data[0], dst_image->plane_size);
}