• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2   Copyright 1999-2016 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     http://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"
22 #include "MagickCore/image-private.h"
23 
24 #if defined(__cplusplus) || defined(c_plusplus)
25 extern "C" {
26 #endif
27 
28 extern MagickPrivate MagickBooleanType
29   ColorComponentGenesis(void),
30   IsEquivalentAlpha(const Image *,const PixelInfo *,const PixelInfo *),
31   IsEquivalentIntensity(const Image *,const PixelInfo *,const PixelInfo *);
32 
33 extern MagickPrivate void
34   ColorComponentTerminus(void);
35 
GetFuzzyColorDistance(const Image * p,const Image * q)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
51