20 #include "../bitmap/bitmap_access.h"
21 #include "../bitmap/processing.h"
34 out_t
out(output,
x,
y);
43 (P.
r *
R.r + P.
g *
R.g + P.
b *
R.b) / 255,
44 (P.
r *
G.r + P.
g *
G.g + P.
b *
G.b) / 255,
45 (P.
r *
B.r + P.
g *
B.g + P.
b *
B.b) / 255,
63 "gl_FragColor = vec4(dot(vec3(100.0/255.0, 196.0/255.0, 48.0/255.0), " + GLSL_RGBA_INPUT +
".rgb)," +
64 "dot(vec3( 89.0/255.0, 175.0/255.0, 43.0/255.0), " + GLSL_RGBA_INPUT +
".rgb)," +
65 "dot(vec3( 69.0/255.0, 138.0/255.0, 33.0/255.0), " + GLSL_RGBA_INPUT +
".rgb)," +
66 GLSL_RGBA_INPUT +
".a);";
A very basic class for any image.
AbstractBitmap * inputBitmap
AbstractBitmap * outputBitmap
virtual void apply(int x, int y, msize nPix, TaskThread &thread)
Applies filtering to given pixel data.
virtual std::string getGlslSourceCode() const
Provides GLSL source code of the filter.
Application of sepia filter on CPU.
static void process(AbstractBitmap &input, AbstractBitmap &output, int x, int y, msize nPix)
uint32_t msize
memory size
Trichromatic integer arithmetic.
4-channel integer arithmetic
jobject jlong jint jint y