| 1 |
/* |
| 2 |
* This file is a part of Luminance HDR package. |
| 3 |
* ---------------------------------------------------------------------- |
| 4 |
* Copyright (C) 2013 Davide Anastasia |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License as published by |
| 8 |
* the Free Software Foundation; either version 2 of the License, or |
| 9 |
* (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program; if not, write to the Free Software |
| 18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 |
* ---------------------------------------------------------------------- |
| 20 |
*/ |
| 21 |
|
| 22 |
//! \brief colorspace conversion base functions |
| 23 |
//! \author Davide Anastasia <[email protected]> |
| 24 |
|
| 25 |
#ifndef PFS_COLORSPACE_TRANSFORM_H |
| 26 |
#define PFS_COLORSPACE_TRANSFORM_H |
| 27 |
|
| 28 |
namespace pfs { |
| 29 |
namespace utils { |
| 30 |
|
| 31 |
//! \brief 3 components to 3 components transform function |
| 32 |
template <typename InputIterator, typename OutputIterator, |
| 33 |
typename ConversionOperator> |
| 34 |
void transform(InputIterator in1, InputIterator in1End, InputIterator in2, |
| 35 |
InputIterator in3, OutputIterator out1, OutputIterator out2, |
| 36 |
OutputIterator out3, ConversionOperator convOp); |
| 37 |
|
| 38 |
//! \brief 4 components to 3 components transform function |
| 39 |
//! useful for CMYK to RGB conversion (or RGBA to RGB) |
| 40 |
template <typename InputIterator, typename OutputIterator, |
| 41 |
typename ConversionOperator> |
| 42 |
void transform(InputIterator in1, InputIterator in1End, InputIterator in2, |
| 43 |
InputIterator in3, InputIterator in4, OutputIterator out1, |
| 44 |
OutputIterator out2, OutputIterator out3, |
| 45 |
ConversionOperator convOp); |
| 46 |
|
| 47 |
//! \brief 3 components to 1 component transform function |
| 48 |
//! useful for channel stripping or RGB to Y conversion |
| 49 |
template <typename InputIterator, typename OutputIterator, |
| 50 |
typename ConversionOperator> |
| 51 |
void transform(InputIterator in1, InputIterator in1End, InputIterator in2, |
| 52 |
InputIterator in3, OutputIterator out1, |
| 53 |
ConversionOperator convOp); |
| 54 |
|
| 55 |
} // utils |
| 56 |
} // pfs |
| 57 |
|
| 58 |
#include <Libpfs/utils/transform.hxx> |
| 59 |
#endif // PFS_COLORSPACE_TRANSFORM_H |