aboutsummaryrefslogtreecommitdiff
path: root/ImageManipulation.hpp
diff options
context:
space:
mode:
authorlns <matzeton@googlemail.com>2022-05-04 12:42:05 +0200
committerlns <matzeton@googlemail.com>2022-05-04 15:29:34 +0200
commit5e7d06b220d21e03d01334c9f445a8407916bb0d (patch)
tree155ea8c0b2efea8571b45b5f6971f3b13cc3fadc /ImageManipulation.hpp
ukrainify-me
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'ImageManipulation.hpp')
-rw-r--r--ImageManipulation.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/ImageManipulation.hpp b/ImageManipulation.hpp
new file mode 100644
index 0000000..e372d96
--- /dev/null
+++ b/ImageManipulation.hpp
@@ -0,0 +1,29 @@
+#ifndef IMAGEMANIPULATION_H
+#define IMAGEMANIPULATION_H 1
+
+/* *************** */
+// required for CImg.h
+#include <cstdio>
+#include <jerror.h>
+#include <jpeglib.h>
+/* *************** */
+
+#include "CImg.h"
+
+#include <string>
+#include <vector>
+
+class ImageManipulation {
+public:
+ ImageManipulation();
+ ~ImageManipulation();
+
+ void SetJpegFromBuffer(std::vector<unsigned char> &image_buffer);
+ void SaveToFile(std::string filename);
+ void Ukrainify(float opacity = 0.5f);
+
+private:
+ cimg_library::CImg<unsigned char> image;
+};
+
+#endif