summaryrefslogtreecommitdiff
path: root/src/im_image.cpp
diff options
context:
space:
mode:
authorscuri <scuri>2009-12-25 22:43:49 +0000
committerscuri <scuri>2009-12-25 22:43:49 +0000
commitfe7fa107ff1fddbd12901a861148b154a4ab013d (patch)
tree7fe1055f4295f501c8dc7f635a578ffb54a32999 /src/im_image.cpp
parentbfaf1f4433372b13eb1b50c3be2c27c547cd9af5 (diff)
New: function imImageCopyPlane.
Diffstat (limited to 'src/im_image.cpp')
-rw-r--r--src/im_image.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/im_image.cpp b/src/im_image.cpp
index 1fb993d..7bbeff1 100644
--- a/src/im_image.cpp
+++ b/src/im_image.cpp
@@ -2,7 +2,7 @@
* \brief Image Manipulation
*
* See Copyright Notice in im_lib.h
- * $Id: im_image.cpp,v 1.4 2009/08/13 22:34:25 scuri Exp $
+ * $Id: im_image.cpp,v 1.5 2009/12/25 22:43:50 scuri Exp $
*/
#include <stdlib.h>
@@ -302,6 +302,15 @@ void imImageCopyData(const imImage* src_image, imImage* dst_image)
}
}
+void imImageCopyPlane(const imImage* src_image, int src_plane, imImage* dst_image, int dst_plane)
+{
+ assert(src_image);
+ assert(dst_image);
+ assert(imImageMatch(src_image, dst_image));
+
+ memcpy(dst_image->data[src_plane], src_image->data[dst_plane], src_image->plane_size);
+}
+
imImage* imImageDuplicate(const imImage* image)
{
assert(image);