quantize.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 quantization methods.
  13. */
  14. #ifndef MAGICKCORE_QUANTIZE_H
  15. #define MAGICKCORE_QUANTIZE_H
  16. #include "magick/colorspace.h"
  17. #if defined(__cplusplus) || defined(c_plusplus)
  18. extern "C" {
  19. #endif
  20. typedef enum
  21. {
  22. UndefinedDitherMethod,
  23. NoDitherMethod,
  24. RiemersmaDitherMethod,
  25. FloydSteinbergDitherMethod
  26. } DitherMethod;
  27. typedef struct _QuantizeInfo
  28. {
  29. size_t
  30. number_colors;
  31. size_t
  32. tree_depth;
  33. MagickBooleanType
  34. dither;
  35. ColorspaceType
  36. colorspace;
  37. MagickBooleanType
  38. measure_error;
  39. size_t
  40. signature;
  41. DitherMethod
  42. dither_method;
  43. } QuantizeInfo;
  44. extern MagickExport MagickBooleanType
  45. CompressImageColormap(Image *),
  46. GetImageQuantizeError(Image *),
  47. PosterizeImage(Image *,const size_t,const MagickBooleanType),
  48. PosterizeImageChannel(Image *,const ChannelType,const size_t,
  49. const MagickBooleanType),
  50. QuantizeImage(const QuantizeInfo *,Image *),
  51. QuantizeImages(const QuantizeInfo *,Image *),
  52. RemapImage(const QuantizeInfo *,Image *,const Image *),
  53. RemapImages(const QuantizeInfo *,Image *,const Image *);
  54. extern MagickExport QuantizeInfo
  55. *AcquireQuantizeInfo(const ImageInfo *),
  56. *CloneQuantizeInfo(const QuantizeInfo *),
  57. *DestroyQuantizeInfo(QuantizeInfo *);
  58. extern MagickExport void
  59. GetQuantizeInfo(QuantizeInfo *);
  60. #if defined(__cplusplus) || defined(c_plusplus)
  61. }
  62. #endif
  63. #endif