filters/gp_filter_resize_alloc: Check w and h
[gfxprim.git] / libs / filters / GP_Brightness.gen.c.t
blob3bce400fba0d524b24369cf6a3e73fb5f0a2f96f
1 @ include source.t
2 /*
3  * Brightness Point filter
4  *
5  * Copyright (C) 2009-2014 Cyril Hrubis <metan@ucw.cz>
6  */
8 #include <core/GP_Clamp.h>
10 @ include point_filter.t
12 @ def filter_op_brightness(val, val_max):
13 GP_CLAMP_GENERIC({{ val }} + (p * {{ val_max }} + 0.5), 0, {{ val_max }})
14 @ end
16 {@ filter_point('brightness', filter_op_brightness, 'float p', 'p') @}