aboutsummaryrefslogtreecommitdiff
path: root/ImageManipulation.hpp
blob: e372d9683439a08b08174e2ad171cf31f1eeb04e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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