cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | 16af1cb | 2009-12-11 21:38:29 +0000 | [diff] [blame] | 2 | Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 graphic resample methods. |
| 17 | */ |
| 18 | #ifndef _MAGICKCORE_RESAMPLE_H |
| 19 | #define _MAGICKCORE_RESAMPLE_H |
| 20 | |
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | #include <magick/cache-view.h> |
| 26 | |
anthony | 449887b | 2010-09-10 02:23:33 +0000 | [diff] [blame] | 27 | /* |
| 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 | */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 33 | typedef 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, |
anthony | 48f7762 | 2010-10-03 14:32:31 +0000 | [diff] [blame] | 49 | JincFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 50 | SincFilter, |
| 51 | KaiserFilter, |
| 52 | WelshFilter, |
| 53 | ParzenFilter, |
| 54 | LagrangeFilter, |
| 55 | BohmanFilter, |
| 56 | BartlettFilter, |
anthony | ba5a7c3 | 2010-09-15 02:42:25 +0000 | [diff] [blame] | 57 | SincFastFilter, |
anthony | 06b1edf | 2010-10-25 01:19:50 +0000 | [diff] [blame^] | 58 | LanczosSharpFilter, |
anthony | 61b5ddd | 2010-10-05 02:33:31 +0000 | [diff] [blame] | 59 | Lanczos2DFilter, |
anthony | e5f0645 | 2010-10-12 05:48:17 +0000 | [diff] [blame] | 60 | Lanczos2DSharpFilter, |
anthony | 853d697 | 2010-10-08 06:01:31 +0000 | [diff] [blame] | 61 | RobidouxFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 62 | SentinelFilter /* a count of all the filters, not a real filter */ |
| 63 | } FilterTypes; |
| 64 | |
anthony | 48f7762 | 2010-10-03 14:32:31 +0000 | [diff] [blame] | 65 | /* Backward compatibility for the more correctly named Jinc Filter |
| 66 | Original sorce of this filter is from "zoom" but it refers to |
| 67 | a reference by Pratt, who does not actualy name the filter. |
| 68 | */ |
| 69 | #define BesselFilter JincFilter |
| 70 | |
| 71 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 72 | typedef enum |
| 73 | { |
| 74 | UndefinedInterpolatePixel, |
| 75 | AverageInterpolatePixel, |
| 76 | BicubicInterpolatePixel, |
| 77 | BilinearInterpolatePixel, |
| 78 | FilterInterpolatePixel, |
| 79 | IntegerInterpolatePixel, |
| 80 | MeshInterpolatePixel, |
| 81 | NearestNeighborInterpolatePixel, |
| 82 | SplineInterpolatePixel |
| 83 | } InterpolatePixelMethod; |
| 84 | |
| 85 | typedef struct _ResampleFilter |
| 86 | ResampleFilter; |
| 87 | |
| 88 | extern MagickExport MagickBooleanType |
| 89 | ResamplePixelColor(ResampleFilter *,const double,const double, |
| 90 | MagickPixelPacket *), |
| 91 | SetResampleFilterInterpolateMethod(ResampleFilter *, |
| 92 | const InterpolatePixelMethod), |
| 93 | SetResampleFilterVirtualPixelMethod(ResampleFilter *, |
| 94 | const VirtualPixelMethod); |
| 95 | |
| 96 | extern MagickExport ResampleFilter |
| 97 | *AcquireResampleFilter(const Image *,ExceptionInfo *), |
| 98 | *DestroyResampleFilter(ResampleFilter *); |
| 99 | |
| 100 | extern MagickExport void |
| 101 | ScaleResampleFilter(ResampleFilter *,const double,const double,const double, |
| 102 | const double), |
| 103 | SetResampleFilter(ResampleFilter *,const FilterTypes,const double); |
| 104 | |
| 105 | #if defined(__cplusplus) || defined(c_plusplus) |
| 106 | } |
| 107 | #endif |
| 108 | |
| 109 | #endif |