diff options
Diffstat (limited to 'digikam/libs/dimg/filters/colormodifier.h')
-rw-r--r-- | digikam/libs/dimg/filters/colormodifier.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/digikam/libs/dimg/filters/colormodifier.h b/digikam/libs/dimg/filters/colormodifier.h new file mode 100644 index 0000000..9473b27 --- /dev/null +++ b/digikam/libs/dimg/filters/colormodifier.h @@ -0,0 +1,63 @@ +/* ============================================================ + * + * This file is a part of digiKam project + * http://www.digikam.org + * + * Date : 2006-01-18 + * Description : color modifier methods for DImg framework + * + * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com> + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ============================================================ */ + +#ifndef COLORMODIFIER_H +#define COLORMODIFIER_H + +// Local includes. + +#include "digikam_export.h" + +namespace Digikam +{ + +class DImg; +class ColorModifierPriv; + +class DIGIKAM_EXPORT ColorModifier +{ +public: + + ColorModifier(); + ~ColorModifier(); + + void reset(); + bool modified() const; + void applyColorModifier(DImg& image, double r, double g, double b, double a); + +private: + + void setTables(int *redMap, int *greenMap, int *blueMap, int *alphaMap, bool sixteenBit); + void getTables(int *redMap, int *greenMap, int *blueMap, int *alphaMap, bool sixteenBit); + void setGamma(double val); + void adjustRGB(double r, double g, double b, double a, bool sixteenBit); + +private: + + ColorModifierPriv* d; + +}; + +} // NameSpace Digikam + +#endif /* COLORMODIFIER_H */ |