-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathimgfilter.h
42 lines (31 loc) · 1.02 KB
/
imgfilter.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
///////////////////////////////////////////////////////////////////////////////
// unvell Common Graphics Module (libugm.a)
// Common classes for cross-platform C++ 2D/3D graphics application.
//
// MIT License
// Copyright 2016-2019 Jingwood, unvell.com, all rights reserved.
///////////////////////////////////////////////////////////////////////////////
#ifndef imgfilter_h
#define imgfilter_h
#include <stdio.h>
#include "image.h"
namespace ugm {
namespace img {
enum CalcMethods {
Add,
Sub,
Lighter,
};
void blur(Image& img);
void gaussBlur(Image& img, const uint range);
void threshold(Image& img, float thresholdValue);
void thresholdSoft(Image& img, float thresholdValue, float curvePower = 3.5 /* 2 ~ 5 */);
void gamma(Image& img, const double gamma);
void flipImageHorizontally(Image& image);
void flipImageVertically(Image& image);
void calc(Image& imga, Image& imgb,
const CalcMethods method = CalcMethods::Lighter,
const float factor = 1.0f);
}
}
#endif /* imgfilter_h */