cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | 1454be7 | 2011-12-19 01:52:48 +0000 | [diff] [blame] | 2 | Copyright 1999-2012 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 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 25 | #include <MagickCore/cache-view.h> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 26 | |
anthony | 449887b | 2010-09-10 02:23:33 +0000 | [diff] [blame] | 27 | /* |
cristy | d76c51e | 2011-03-26 00:21:26 +0000 | [diff] [blame] | 28 | WARNING: The order of this table must also match the order of a table |
anthony | cf4e33d | 2012-06-08 07:33:23 +0000 | [diff] [blame] | 29 | located in AcquireResizeFilter() in "resize.c" otherwise the users filter |
cristy | d76c51e | 2011-03-26 00:21:26 +0000 | [diff] [blame] | 30 | will not match the actual filter that is setup. |
anthony | 449887b | 2010-09-10 02:23:33 +0000 | [diff] [blame] | 31 | */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 32 | typedef enum |
| 33 | { |
| 34 | UndefinedFilter, |
| 35 | PointFilter, |
| 36 | BoxFilter, |
| 37 | TriangleFilter, |
| 38 | HermiteFilter, |
anthony | f60ffd7 | 2012-08-20 03:25:30 +0000 | [diff] [blame] | 39 | HannFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 40 | HammingFilter, |
| 41 | BlackmanFilter, |
| 42 | GaussianFilter, |
| 43 | QuadraticFilter, |
| 44 | CubicFilter, |
| 45 | CatromFilter, |
| 46 | MitchellFilter, |
anthony | 48f7762 | 2010-10-03 14:32:31 +0000 | [diff] [blame] | 47 | JincFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 48 | SincFilter, |
anthony | 152700d | 2010-10-28 02:43:18 +0000 | [diff] [blame] | 49 | SincFastFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 50 | KaiserFilter, |
anthony | f60ffd7 | 2012-08-20 03:25:30 +0000 | [diff] [blame] | 51 | WelchFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 52 | ParzenFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 53 | BohmanFilter, |
| 54 | BartlettFilter, |
anthony | 152700d | 2010-10-28 02:43:18 +0000 | [diff] [blame] | 55 | LagrangeFilter, |
| 56 | LanczosFilter, |
anthony | 06b1edf | 2010-10-25 01:19:50 +0000 | [diff] [blame] | 57 | LanczosSharpFilter, |
anthony | 152700d | 2010-10-28 02:43:18 +0000 | [diff] [blame] | 58 | Lanczos2Filter, |
| 59 | Lanczos2SharpFilter, |
anthony | 853d697 | 2010-10-08 06:01:31 +0000 | [diff] [blame] | 60 | RobidouxFilter, |
anthony | 4553109 | 2012-04-23 00:33:53 +0000 | [diff] [blame] | 61 | RobidouxSharpFilter, |
anthony | 5d4a170 | 2012-05-08 01:22:41 +0000 | [diff] [blame] | 62 | CosineFilter, |
anthony | cf4e33d | 2012-06-08 07:33:23 +0000 | [diff] [blame] | 63 | SplineFilter, |
anthony | aa80642 | 2012-10-17 00:56:10 +0000 | [diff] [blame^] | 64 | LanczosRadiusFilter, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 65 | SentinelFilter /* a count of all the filters, not a real filter */ |
| 66 | } FilterTypes; |
| 67 | |
cristy | 2ab242e | 2011-03-11 02:45:46 +0000 | [diff] [blame] | 68 | /* |
| 69 | Backward compatibility for the more correctly named Jinc Filter. Original |
| 70 | source of this filter is from "zoom" but it refers to a reference by Pratt, |
| 71 | who does not actualy name the filter. |
anthony | f60ffd7 | 2012-08-20 03:25:30 +0000 | [diff] [blame] | 72 | |
| 73 | also miss-spellings of common filters |
anthony | 48f7762 | 2010-10-03 14:32:31 +0000 | [diff] [blame] | 74 | */ |
anthony | f60ffd7 | 2012-08-20 03:25:30 +0000 | [diff] [blame] | 75 | #define BesselFilter JincFilter |
| 76 | #define WelshFilter WelchFilter |
| 77 | #define HanningFilter HannFilter |
anthony | 48f7762 | 2010-10-03 14:32:31 +0000 | [diff] [blame] | 78 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 79 | typedef struct _ResampleFilter |
| 80 | ResampleFilter; |
| 81 | |
| 82 | extern MagickExport MagickBooleanType |
| 83 | ResamplePixelColor(ResampleFilter *,const double,const double, |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame] | 84 | PixelInfo *,ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 85 | SetResampleFilterInterpolateMethod(ResampleFilter *, |
cristy | 5c4e258 | 2011-09-11 19:21:03 +0000 | [diff] [blame] | 86 | const PixelInterpolateMethod), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 87 | SetResampleFilterVirtualPixelMethod(ResampleFilter *, |
| 88 | const VirtualPixelMethod); |
| 89 | |
| 90 | extern MagickExport ResampleFilter |
| 91 | *AcquireResampleFilter(const Image *,ExceptionInfo *), |
| 92 | *DestroyResampleFilter(ResampleFilter *); |
| 93 | |
| 94 | extern MagickExport void |
| 95 | ScaleResampleFilter(ResampleFilter *,const double,const double,const double, |
| 96 | const double), |
cristy | aa2c16c | 2012-03-25 22:21:35 +0000 | [diff] [blame] | 97 | SetResampleFilter(ResampleFilter *,const FilterTypes); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 98 | |
| 99 | #if defined(__cplusplus) || defined(c_plusplus) |
| 100 | } |
| 101 | #endif |
| 102 | |
| 103 | #endif |