distort.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 image distortion methods.
  13. */
  14. #ifndef MAGICKCORE_DISTORT_H
  15. #define MAGICKCORE_DISTORT_H
  16. #if defined(__cplusplus) || defined(c_plusplus)
  17. extern "C" {
  18. #endif
  19. /*
  20. These two enum are linked, with common enumerated values. Both
  21. DistortImages() and SparseColor() often share code to determine functional
  22. coefficients for common methods.
  23. Caution should be taken to ensure that only the common methods contain the
  24. same enumerated value, while all others remain unique across both
  25. enumerations.
  26. */
  27. typedef enum
  28. {
  29. UndefinedDistortion,
  30. AffineDistortion,
  31. AffineProjectionDistortion,
  32. ScaleRotateTranslateDistortion,
  33. PerspectiveDistortion,
  34. PerspectiveProjectionDistortion,
  35. BilinearForwardDistortion,
  36. BilinearDistortion = BilinearForwardDistortion,
  37. BilinearReverseDistortion,
  38. PolynomialDistortion,
  39. ArcDistortion,
  40. PolarDistortion,
  41. DePolarDistortion,
  42. Cylinder2PlaneDistortion,
  43. Plane2CylinderDistortion,
  44. BarrelDistortion,
  45. BarrelInverseDistortion,
  46. ShepardsDistortion,
  47. ResizeDistortion,
  48. SentinelDistortion
  49. } DistortImageMethod;
  50. typedef enum
  51. {
  52. UndefinedColorInterpolate = UndefinedDistortion,
  53. BarycentricColorInterpolate = AffineDistortion,
  54. BilinearColorInterpolate = BilinearReverseDistortion,
  55. PolynomialColorInterpolate = PolynomialDistortion,
  56. ShepardsColorInterpolate = ShepardsDistortion,
  57. /*
  58. Methods unique to SparseColor().
  59. */
  60. VoronoiColorInterpolate = SentinelDistortion,
  61. InverseColorInterpolate,
  62. ManhattanColorInterpolate
  63. } SparseColorMethod;
  64. extern MagickExport Image
  65. *AffineTransformImage(const Image *,const AffineMatrix *,ExceptionInfo *),
  66. *DistortImage(const Image *,const DistortImageMethod,const size_t,
  67. const double *,MagickBooleanType,ExceptionInfo *exception),
  68. *DistortResizeImage(const Image *,const size_t,const size_t,ExceptionInfo *),
  69. *RotateImage(const Image *,const double,ExceptionInfo *),
  70. *SparseColorImage(const Image *,const ChannelType,const SparseColorMethod,
  71. const size_t,const double *,ExceptionInfo *);
  72. #if defined(__cplusplus) || defined(c_plusplus)
  73. }
  74. #endif
  75. #endif