diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ppm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ppm.h b/lib/ppm.h index 0695295f..57b6c04a 100644 --- a/lib/ppm.h +++ b/lib/ppm.h @@ -250,6 +250,12 @@ ppm_hsv_from_color(pixel const color, pixval const maxval); static __inline pixval +ppm_luminosity(pixel const p) { + + return (pixval)(PPM_LUMIN(p) + 0.5); +} + +static __inline pixval ppm_colorvalue(pixel const p) { /*---------------------------------------------------------------------------- The color value (V is HSV) as a pixval |