MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
color-private.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
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  https://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 private image color methods.
17 */
18 #ifndef MAGICKCORE_COLOR_PRIVATE_H
19 #define MAGICKCORE_COLOR_PRIVATE_H
20 
21 #include "MagickCore/image.h"
23 
24 #if defined(__cplusplus) || defined(c_plusplus)
25 extern "C" {
26 #endif
27 
30  IsEquivalentAlpha(const Image *,const PixelInfo *,const PixelInfo *),
31  IsEquivalentIntensity(const Image *,const PixelInfo *,const PixelInfo *);
32 
33 extern MagickPrivate void
35 
36 static inline double GetFuzzyColorDistance(const Image *p,const Image *q)
37 {
38  double
39  fuzz;
40 
41  fuzz=(double) MagickMax(MagickMax(p->fuzz,q->fuzz),(MagickRealType)
42  MagickSQ1_2);
43  return(fuzz*fuzz);
44 }
45 
46 #if defined(__cplusplus) || defined(c_plusplus)
47 }
48 #endif
49 
50 #endif
MagickDoubleType MagickRealType
Definition: magick-type.h:118
#define MagickSQ1_2
Definition: image-private.h:32
MagickPrivate MagickBooleanType ColorComponentGenesis(void)
MagickPrivate MagickBooleanType IsEquivalentAlpha(const Image *, const PixelInfo *, const PixelInfo *)
static double GetFuzzyColorDistance(const Image *p, const Image *q)
Definition: color-private.h:36
Definition: image.h:151
MagickBooleanType
Definition: magick-type.h:156
MagickPrivate void ColorComponentTerminus(void)
Definition: color.c:964
MagickPrivate MagickBooleanType IsEquivalentIntensity(const Image *, const PixelInfo *, const PixelInfo *)
Definition: color.c:1860
#define MagickMax(x, y)
Definition: image-private.h:26
#define MagickPrivate
double fuzz
Definition: image.h:216