1 /*
2 % Copyright (C) 2004 - 2012 GraphicsMagick Group
3 %
4 % This program is covered by multiple licenses, which are described in
5 % Copyright.txt. You should have received a copy of Copyright.txt with this
6 % package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
7 %
8 % Interfaces to support quantum operators.
9 % Written by Bob Friesenhahn, March 2004.
10 %
11 */
12 #ifndef _MAGICK_OPERATOR_H
13 #define _MAGICK_OPERATOR_H
14 
15 #if defined(__cplusplus) || defined(c_plusplus)
16 extern "C" {
17 #endif
18 
19 /*
20   Include declarations.
21 */
22 typedef enum
23 {
24   UndefinedQuantumOp = 0,
25   AddQuantumOp,                   /* Add value */
26   AndQuantumOp,                   /* Bitwise AND value */
27   AssignQuantumOp,                /* Direct value assignment */
28   DivideQuantumOp,                /* Divide by value */
29   LShiftQuantumOp,                /* Bitwise left-shift value N bits */
30   MultiplyQuantumOp,              /* Multiply by value */
31   OrQuantumOp,                    /* Bitwise OR value */
32   RShiftQuantumOp,                /* Bitwise right shift value */
33   SubtractQuantumOp,              /* Subtract value */
34   ThresholdQuantumOp,             /* Above threshold white, otherwise black */
35   ThresholdBlackQuantumOp,        /* Below threshold is black */
36   ThresholdWhiteQuantumOp,        /* Above threshold is white */
37   XorQuantumOp,                   /* Bitwise XOR value */
38   NoiseGaussianQuantumOp,         /* Gaussian noise */
39   NoiseImpulseQuantumOp,          /* Impulse noise */
40   NoiseLaplacianQuantumOp,        /* Laplacian noise */
41   NoiseMultiplicativeQuantumOp,   /* Multiplicative gaussian noise */
42   NoisePoissonQuantumOp,          /* Poisson noise */
43   NoiseUniformQuantumOp,          /* Uniform noise */
44   NegateQuantumOp,                /* Negate (invert) channel, ignore value */
45   GammaQuantumOp,                 /* Adjust image gamma */
46   DepthQuantumOp,                 /* Adjust image depth */
47   /* Below added on 2008-12-13 */
48   LogQuantumOp,                   /* log(quantum*value+1)/log(value+1) */
49   MaxQuantumOp,                   /* Assign value if > quantum */
50   MinQuantumOp,                   /* Assign value if < quantum */
51   PowQuantumOp,                   /* Power function: pow(quantum,value) */
52   /* Below added on 2012-03-17 */
53   NoiseRandomQuantumOp,           /* Random noise */
54   /* Below added on 2014-05-17 */
55   ThresholdBlackNegateQuantumOp,  /* Below threshold is set to white */
56   ThresholdWhiteNegateQuantumOp   /* Above threshold is set to black */
57 
58  } QuantumOperator;
59 
60 extern MagickExport MagickPassFail
61   QuantumOperatorImage(Image *image,const ChannelType channel,
62     const QuantumOperator quantum_operator,const double rvalue,
63     ExceptionInfo *exception),
64   QuantumOperatorImageMultivalue(Image *image,
65                                  const QuantumOperator quantum_operator,
66                                  const char *values),
67   QuantumOperatorRegionImage(Image *image,const long x,const long y,
68     const unsigned long columns,const unsigned long rows,
69     const ChannelType channel,const QuantumOperator quantum_operator,
70     const double rvalue,ExceptionInfo *exception);
71 
72 #if defined(__cplusplus) || defined(c_plusplus)
73 }
74 #endif
75 
76 #endif
77 
78 /*
79  * Local Variables:
80  * mode: c
81  * c-basic-offset: 2
82  * fill-column: 78
83  * End:
84  */
85