resample.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore graphic resample methods.
  13. */
  14. #ifndef MAGICKCORE_RESAMPLE_H
  15. #define MAGICKCORE_RESAMPLE_H
  16. #include "magick/cache-view.h"
  17. #if defined(__cplusplus) || defined(c_plusplus)
  18. extern "C" {
  19. #endif
  20. /*
  21. WARNING: The order of this table must also match the order of a table
  22. located in AcquireResizeFilter() in "resize.c" otherwise the users filter
  23. will not match the actual filter that is setup.
  24. */
  25. typedef enum
  26. {
  27. UndefinedFilter,
  28. PointFilter,
  29. BoxFilter,
  30. TriangleFilter,
  31. HermiteFilter,
  32. HanningFilter,
  33. HammingFilter,
  34. BlackmanFilter,
  35. GaussianFilter,
  36. QuadraticFilter,
  37. CubicFilter,
  38. CatromFilter,
  39. MitchellFilter,
  40. JincFilter,
  41. SincFilter,
  42. SincFastFilter,
  43. KaiserFilter,
  44. WelshFilter,
  45. ParzenFilter,
  46. BohmanFilter,
  47. BartlettFilter,
  48. LagrangeFilter,
  49. LanczosFilter,
  50. LanczosSharpFilter,
  51. Lanczos2Filter,
  52. Lanczos2SharpFilter,
  53. RobidouxFilter,
  54. RobidouxSharpFilter,
  55. CosineFilter,
  56. SplineFilter,
  57. LanczosRadiusFilter,
  58. SentinelFilter /* a count of all the filters, not a real filter */
  59. } FilterTypes;
  60. /*
  61. Backward compatibility for the more correctly named Jinc Filter. Original
  62. source of this filter is from "zoom" but it refers to a reference by Pratt,
  63. who does not actualy name the filter.
  64. */
  65. #define BesselFilter JincFilter
  66. typedef struct _ResampleFilter
  67. ResampleFilter;
  68. extern MagickExport MagickBooleanType
  69. ResamplePixelColor(ResampleFilter *,const double,const double,
  70. MagickPixelPacket *),
  71. SetResampleFilterInterpolateMethod(ResampleFilter *,
  72. const InterpolatePixelMethod),
  73. SetResampleFilterVirtualPixelMethod(ResampleFilter *,
  74. const VirtualPixelMethod);
  75. extern MagickExport ResampleFilter
  76. *AcquireResampleFilter(const Image *,ExceptionInfo *),
  77. *DestroyResampleFilter(ResampleFilter *);
  78. extern MagickExport void
  79. ScaleResampleFilter(ResampleFilter *,const double,const double,const double,
  80. const double),
  81. SetResampleFilter(ResampleFilter *,const FilterTypes,const double);
  82. #if defined(__cplusplus) || defined(c_plusplus)
  83. }
  84. #endif
  85. #endif