blob: 377a19faebc791afbb665250f30f40a61b96508a [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy1454be72011-12-19 01:52:48 +00002 Copyright 1999-2012 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
cristy4c08aed2011-07-01 19:47:50 +000025#include <MagickCore/cache-view.h>
cristy3ed852e2009-09-05 21:47:34 +000026
anthony449887b2010-09-10 02:23:33 +000027/*
cristyd76c51e2011-03-26 00:21:26 +000028 WARNING: The order of this table must also match the order of a table
anthonycf4e33d2012-06-08 07:33:23 +000029 located in AcquireResizeFilter() in "resize.c" otherwise the users filter
cristyd76c51e2011-03-26 00:21:26 +000030 will not match the actual filter that is setup.
anthony449887b2010-09-10 02:23:33 +000031*/
cristy3ed852e2009-09-05 21:47:34 +000032typedef enum
33{
34 UndefinedFilter,
35 PointFilter,
36 BoxFilter,
37 TriangleFilter,
38 HermiteFilter,
anthonyf60ffd72012-08-20 03:25:30 +000039 HannFilter,
cristy3ed852e2009-09-05 21:47:34 +000040 HammingFilter,
41 BlackmanFilter,
42 GaussianFilter,
43 QuadraticFilter,
44 CubicFilter,
45 CatromFilter,
46 MitchellFilter,
anthony48f77622010-10-03 14:32:31 +000047 JincFilter,
cristy3ed852e2009-09-05 21:47:34 +000048 SincFilter,
anthony152700d2010-10-28 02:43:18 +000049 SincFastFilter,
cristy3ed852e2009-09-05 21:47:34 +000050 KaiserFilter,
anthonyf60ffd72012-08-20 03:25:30 +000051 WelchFilter,
cristy3ed852e2009-09-05 21:47:34 +000052 ParzenFilter,
cristy3ed852e2009-09-05 21:47:34 +000053 BohmanFilter,
54 BartlettFilter,
anthony152700d2010-10-28 02:43:18 +000055 LagrangeFilter,
56 LanczosFilter,
anthony06b1edf2010-10-25 01:19:50 +000057 LanczosSharpFilter,
anthony152700d2010-10-28 02:43:18 +000058 Lanczos2Filter,
59 Lanczos2SharpFilter,
anthony853d6972010-10-08 06:01:31 +000060 RobidouxFilter,
anthony45531092012-04-23 00:33:53 +000061 RobidouxSharpFilter,
anthony5d4a1702012-05-08 01:22:41 +000062 CosineFilter,
anthonycf4e33d2012-06-08 07:33:23 +000063 SplineFilter,
cristy3ed852e2009-09-05 21:47:34 +000064 SentinelFilter /* a count of all the filters, not a real filter */
65} FilterTypes;
66
cristy2ab242e2011-03-11 02:45:46 +000067/*
68 Backward compatibility for the more correctly named Jinc Filter. Original
69 source of this filter is from "zoom" but it refers to a reference by Pratt,
70 who does not actualy name the filter.
anthonyf60ffd72012-08-20 03:25:30 +000071
72 also miss-spellings of common filters
anthony48f77622010-10-03 14:32:31 +000073*/
anthonyf60ffd72012-08-20 03:25:30 +000074#define BesselFilter JincFilter
75#define WelshFilter WelchFilter
76#define HanningFilter HannFilter
anthony48f77622010-10-03 14:32:31 +000077
cristy3ed852e2009-09-05 21:47:34 +000078typedef struct _ResampleFilter
79 ResampleFilter;
80
81extern MagickExport MagickBooleanType
82 ResamplePixelColor(ResampleFilter *,const double,const double,
cristydb070952012-04-20 14:33:00 +000083 PixelInfo *,ExceptionInfo *),
cristy3ed852e2009-09-05 21:47:34 +000084 SetResampleFilterInterpolateMethod(ResampleFilter *,
cristy5c4e2582011-09-11 19:21:03 +000085 const PixelInterpolateMethod),
cristy3ed852e2009-09-05 21:47:34 +000086 SetResampleFilterVirtualPixelMethod(ResampleFilter *,
87 const VirtualPixelMethod);
88
89extern MagickExport ResampleFilter
90 *AcquireResampleFilter(const Image *,ExceptionInfo *),
91 *DestroyResampleFilter(ResampleFilter *);
92
93extern MagickExport void
94 ScaleResampleFilter(ResampleFilter *,const double,const double,const double,
95 const double),
cristyaa2c16c2012-03-25 22:21:35 +000096 SetResampleFilter(ResampleFilter *,const FilterTypes);
cristy3ed852e2009-09-05 21:47:34 +000097
98#if defined(__cplusplus) || defined(c_plusplus)
99}
100#endif
101
102#endif