quantize.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore image quantization methods.
00017 */
00018 #ifndef MAGICKCORE_QUANTIZE_H
00019 #define MAGICKCORE_QUANTIZE_H
00020 
00021 #include "MagickCore/colorspace.h"
00022 
00023 #if defined(__cplusplus) || defined(c_plusplus)
00024 extern "C" {
00025 #endif
00026 
00027 typedef enum
00028 {
00029   UndefinedDitherMethod,
00030   NoDitherMethod,
00031   RiemersmaDitherMethod,
00032   FloydSteinbergDitherMethod
00033 } DitherMethod;
00034 
00035 typedef struct _QuantizeInfo
00036 {
00037   size_t
00038     number_colors;     /* desired maximum number of colors */
00039 
00040   size_t
00041     tree_depth;
00042 
00043   ColorspaceType
00044     colorspace;
00045 
00046   DitherMethod
00047     dither_method;
00048 
00049   MagickBooleanType
00050     measure_error;
00051 
00052   size_t
00053     signature;
00054 } QuantizeInfo;
00055 
00056 
00057 extern MagickExport MagickBooleanType
00058   CompressImageColormap(Image *,ExceptionInfo *),
00059   GetImageQuantizeError(Image *,ExceptionInfo *),
00060   KmeansImage(Image *,const size_t,const size_t,const double,ExceptionInfo *),
00061   PosterizeImage(Image *,const size_t,const DitherMethod,ExceptionInfo *),
00062   QuantizeImage(const QuantizeInfo *,Image *,ExceptionInfo *),
00063   QuantizeImages(const QuantizeInfo *,Image *,ExceptionInfo *),
00064   RemapImage(const QuantizeInfo *,Image *,const Image *,ExceptionInfo *),
00065   RemapImages(const QuantizeInfo *,Image *,const Image *,ExceptionInfo *);
00066 
00067 extern MagickExport QuantizeInfo
00068   *AcquireQuantizeInfo(const ImageInfo *),
00069   *CloneQuantizeInfo(const QuantizeInfo *),
00070   *DestroyQuantizeInfo(QuantizeInfo *);
00071 
00072 extern MagickExport void
00073   GetQuantizeInfo(QuantizeInfo *);
00074 
00075 #if defined(__cplusplus) || defined(c_plusplus)
00076 }
00077 #endif
00078 
00079 #endif

Generated on 18 May 2020 for MagickCore by  doxygen 1.6.1