summaryrefslogtreecommitdiff
path: root/src/imageutils.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-24 03:02:31 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-24 03:02:31 (GMT)
commit1e7636e364535c78e4eebd36666bac5d352c3608 (patch)
tree5479c9229973795a771f912f3c3414f2075f2875 /src/imageutils.cc
parent1bec7aad09631d3f86874ead2c26335bc897fde5 (diff)
add files removed from test path
Diffstat (limited to 'src/imageutils.cc')
-rw-r--r--src/imageutils.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/imageutils.cc b/src/imageutils.cc
new file mode 100644
index 0000000..e15ba2b
--- /dev/null
+++ b/src/imageutils.cc
@@ -0,0 +1,16 @@
+#include "imageutils.h"
+#include <string.h>
+
+void flip_image(const unsigned char *src, unsigned char *dst, size_t pixelsize, size_t width, size_t height)
+{
+ size_t rowBytes = pixelsize * width;
+ for (size_t i = 0 ; i < height ; i++) {
+ memmove(dst + (height - i - 1) * rowBytes, src + i * rowBytes, rowBytes);
+ }
+}
+
+#ifdef __APPLE__
+#include "imageutils-macosx.cc"
+#else
+#include "imageutils-lodepng.cc"
+#endif
contact: Jan Huwald // Impressum