Euphoria
imagefilters.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "base/rgb.h"
4 
5 namespace eu
6 {
7  struct Angle;
8  struct Rgb;
9 }
10 
11 namespace eu::core
12 {
13  struct Image;
14  struct Palette;
15 
16  enum class Grayscale
17  {
18  r,
19  g,
20  b,
21  a,
22  max,
23  gamma,
24  linear,
25  average
26  };
27 
28  Rgbai make_grayscale(Rgbai color, Grayscale grayscale);
29  void make_grayscale(Image* image, Grayscale grayscale);
30  void match_palette(Image* image, const Palette& palette);
31  void match_palette_dither(Image* image, const Palette& palette);
32  void filter_edge_detection(Image* image, float r);
33  void filter_color_detection(Image* image, Rgb color, float r);
34  void change_brightness(Image* image, int change);
35  void change_contrast(Image* image, const Angle& contrast);
36 
37  // todo(Gustav):
38  // https://www.processing.org/tutorials/pixels/
39  // https://www.codeproject.com/Articles/996192/Some-Cool-Image-Effects
40  // https://www.gamedev.net/articles/programming/graphics/an-introduction-to-digital-image-processing-r2007/
41  // https://github.com/jamieowen/glsl-blend
42  // color controls https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch22.html
43 }
void filter_edge_detection(Image *image, float r)
void change_contrast(Image *image, const Angle &contrast)
void match_palette(Image *image, const Palette &palette)
Definition: imagefilters.cc:65
void filter_color_detection(Image *image, Rgb color, float r)
void match_palette_dither(Image *image, const Palette &palette)
Definition: imagefilters.cc:93
void change_brightness(Image *image, int change)
Rgbai make_grayscale(Rgbai c, Grayscale grayscale)
Definition: imagefilters.cc:23
Definition: assert.h:90
Definition: rgb.h:62
Definition: rgb.h:45