blob: b72d62dceb83b79f5e537cf0f0bb6778a9e96215 [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
anthony449887b2010-09-10 02:23:33 +000027/*
28 WARNING: The order of this table must also match the order
29 of a table located in AcquireResizeFilter() or "resize.c"
30 Otherwise the users filter will not match the actual filter
31 that is setup.
32*/
cristy3ed852e2009-09-05 21:47:34 +000033typedef enum
34{
35 UndefinedFilter,
36 PointFilter,
37 BoxFilter,
38 TriangleFilter,
39 HermiteFilter,
40 HanningFilter,
41 HammingFilter,
42 BlackmanFilter,
43 GaussianFilter,
44 QuadraticFilter,
45 CubicFilter,
46 CatromFilter,
47 MitchellFilter,
48 LanczosFilter,
anthony48f77622010-10-03 14:32:31 +000049 JincFilter,
cristy3ed852e2009-09-05 21:47:34 +000050 SincFilter,
51 KaiserFilter,
52 WelshFilter,
53 ParzenFilter,
54 LagrangeFilter,
55 BohmanFilter,
56 BartlettFilter,
anthonyba5a7c32010-09-15 02:42:25 +000057 SincFastFilter,
anthony61b5ddd2010-10-05 02:33:31 +000058 Lanczos2DFilter,
anthony853d6972010-10-08 06:01:31 +000059 RobidouxFilter,
cristy3ed852e2009-09-05 21:47:34 +000060 SentinelFilter /* a count of all the filters, not a real filter */
61} FilterTypes;
62
anthony48f77622010-10-03 14:32:31 +000063/* Backward compatibility for the more correctly named Jinc Filter
64 Original sorce of this filter is from "zoom" but it refers to
65 a reference by Pratt, who does not actualy name the filter.
66*/
67#define BesselFilter JincFilter
68
69
cristy3ed852e2009-09-05 21:47:34 +000070typedef enum
71{
72 UndefinedInterpolatePixel,
73 AverageInterpolatePixel,
74 BicubicInterpolatePixel,
75 BilinearInterpolatePixel,
76 FilterInterpolatePixel,
77 IntegerInterpolatePixel,
78 MeshInterpolatePixel,
79 NearestNeighborInterpolatePixel,
80 SplineInterpolatePixel
81} InterpolatePixelMethod;
82
83typedef struct _ResampleFilter
84 ResampleFilter;
85
86extern MagickExport MagickBooleanType
87 ResamplePixelColor(ResampleFilter *,const double,const double,
88 MagickPixelPacket *),
89 SetResampleFilterInterpolateMethod(ResampleFilter *,
90 const InterpolatePixelMethod),
91 SetResampleFilterVirtualPixelMethod(ResampleFilter *,
92 const VirtualPixelMethod);
93
94extern MagickExport ResampleFilter
95 *AcquireResampleFilter(const Image *,ExceptionInfo *),
96 *DestroyResampleFilter(ResampleFilter *);
97
98extern MagickExport void
99 ScaleResampleFilter(ResampleFilter *,const double,const double,const double,
100 const double),
101 SetResampleFilter(ResampleFilter *,const FilterTypes,const double);
102
103#if defined(__cplusplus) || defined(c_plusplus)
104}
105#endif
106
107#endif