blob: ceb584fa3c112b560ea92cfb6aeb8a4319078904 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
2 Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 http://www.imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 MagickCore image distortion methods.
17*/
18#ifndef _MAGICKCORE_DISTORT_H
19#define _MAGICKCORE_DISTORT_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include <magick/draw.h>
26
27/*
28 These two enum are linked, with common enumerated values. Both
29 DistortImages() and SparseColor() often share code to determine
30 functional coefficients for common methods.
31
32 Caution should be taken to ensure that only the common methods contain the
33 same enumerated value, while all others remain unique across both
34 enumerations.
35*/
36typedef enum
37{
38 UndefinedDistortion,
39 AffineDistortion,
40 AffineProjectionDistortion,
41 ScaleRotateTranslateDistortion,
42 PerspectiveDistortion,
43 PerspectiveProjectionDistortion,
44 BilinearForwardDistortion,
45 BilinearDistortion = BilinearForwardDistortion,
46 BilinearReverseDistortion,
47 PolynomialDistortion,
48 ArcDistortion,
49 PolarDistortion,
50 DePolarDistortion,
51 BarrelDistortion,
52 BarrelInverseDistortion,
53 ShepardsDistortion,
54 SentinelDistortion
55} DistortImageMethod;
56
57
58typedef enum
59{
60 UndefinedColorInterpolate = UndefinedDistortion,
61 BarycentricColorInterpolate = AffineDistortion,
62 BilinearColorInterpolate = BilinearReverseDistortion,
63 PolynomialColorInterpolate = PolynomialDistortion,
64 ShepardsColorInterpolate = ShepardsDistortion,
65 /* Methods unique to SparseColor(): */
66 VoronoiColorInterpolate = SentinelDistortion
67} SparseColorMethod;
68
69extern MagickExport Image
70 *DistortImage(const Image *,const DistortImageMethod,const unsigned long,
71 const double *,MagickBooleanType,ExceptionInfo *exception),
72 *SparseColorImage(const Image *,const ChannelType,const SparseColorMethod,
73 const unsigned long,const double *,ExceptionInfo *);
74
75#if defined(__cplusplus) || defined(c_plusplus)
76}
77#endif
78
79#endif