diff options
Diffstat (limited to '')
-rw-r--r-- | src/display/grayscale.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/display/grayscale.h b/src/display/grayscale.h new file mode 100644 index 0000000..9c382cd --- /dev/null +++ b/src/display/grayscale.h @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef SEEN_DISPLAY_GRAYSCALE_H +#define SEEN_DISPLAY_GRAYSCALE_H + +/* + * Author: + * Johan Engelen <goejendaagh@zonnet.nl> + * + * Copyright (C) 2011 Author + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +typedef unsigned int guint32; + +/** + * Provide methods to calculate grayscale values (e.g. convert rgba value to grayscale rgba value). + */ +namespace Grayscale { + guint32 process(guint32 rgba); + guint32 process(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + unsigned char luminance(unsigned char r, unsigned char g, unsigned char b); +}; + +#endif // !SEEN_DISPLAY_GRAYSCALE_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |