blob: 064734c0cda5445fe7d2321614e667eb919b3f1a [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy16af1cb2009-12-11 21:38:29 +00002 Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 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 graphic resample methods.
17*/
18#ifndef _MAGICKCORE_RESAMPLE_H
19#define _MAGICKCORE_RESAMPLE_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include <magick/cache-view.h>
26
27typedef enum
28{
29 UndefinedFilter,
30 PointFilter,
31 BoxFilter,
32 TriangleFilter,
33 HermiteFilter,
34 HanningFilter,
35 HammingFilter,
36 BlackmanFilter,
37 GaussianFilter,
38 QuadraticFilter,
39 CubicFilter,
40 CatromFilter,
41 MitchellFilter,
42 LanczosFilter,
43 BesselFilter,
44 SincFilter,
45 KaiserFilter,
46 WelshFilter,
47 ParzenFilter,
48 LagrangeFilter,
49 BohmanFilter,
50 BartlettFilter,
anthony720660f2010-09-07 10:05:14 +000051 SincPolynomialFilter,
cristy3ed852e2009-09-05 21:47:34 +000052 SentinelFilter /* a count of all the filters, not a real filter */
53} FilterTypes;
54
55typedef enum
56{
57 UndefinedInterpolatePixel,
58 AverageInterpolatePixel,
59 BicubicInterpolatePixel,
60 BilinearInterpolatePixel,
61 FilterInterpolatePixel,
62 IntegerInterpolatePixel,
63 MeshInterpolatePixel,
64 NearestNeighborInterpolatePixel,
65 SplineInterpolatePixel
66} InterpolatePixelMethod;
67
68typedef struct _ResampleFilter
69 ResampleFilter;
70
71extern MagickExport MagickBooleanType
72 ResamplePixelColor(ResampleFilter *,const double,const double,
73 MagickPixelPacket *),
74 SetResampleFilterInterpolateMethod(ResampleFilter *,
75 const InterpolatePixelMethod),
76 SetResampleFilterVirtualPixelMethod(ResampleFilter *,
77 const VirtualPixelMethod);
78
79extern MagickExport ResampleFilter
80 *AcquireResampleFilter(const Image *,ExceptionInfo *),
81 *DestroyResampleFilter(ResampleFilter *);
82
83extern MagickExport void
84 ScaleResampleFilter(ResampleFilter *,const double,const double,const double,
85 const double),
86 SetResampleFilter(ResampleFilter *,const FilterTypes,const double);
87
88#if defined(__cplusplus) || defined(c_plusplus)
89}
90#endif
91
92#endif