aboutsummaryrefslogtreecommitdiff
path: root/ImageManipulation.hpp
diff options
context:
space:
mode:
authorlns <matzeton@googlemail.com>2022-05-06 11:38:26 +0200
committerlns <matzeton@googlemail.com>2022-05-06 11:38:26 +0200
commit3b4947b8b4a5c6ec9421ade5cc759ca3b947bd67 (patch)
tree8ac0c497f65dee15cf8d0796acc640d0d0e27092 /ImageManipulation.hpp
parent5e7d06b220d21e03d01334c9f445a8407916bb0d (diff)
png supportHEADmaster
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'ImageManipulation.hpp')
-rw-r--r--ImageManipulation.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ImageManipulation.hpp b/ImageManipulation.hpp
index e372d96..784e326 100644
--- a/ImageManipulation.hpp
+++ b/ImageManipulation.hpp
@@ -13,17 +13,21 @@
#include <string>
#include <vector>
+enum ImageFormat { IF_UNSUPPORTED, IF_JPEG, IF_PNG };
+
class ImageManipulation {
public:
ImageManipulation();
~ImageManipulation();
- void SetJpegFromBuffer(std::vector<unsigned char> &image_buffer);
+ bool SetImageFromBuffer(std::vector<unsigned char> &image_buffer);
void SaveToFile(std::string filename);
void Ukrainify(float opacity = 0.5f);
private:
cimg_library::CImg<unsigned char> image;
+
+ enum ImageFormat GetImageFormat(std::vector<unsigned char> &image_buffer);
};
#endif