]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/xwindow-private.h
(no commit message)
[imagemagick] / MagickCore / xwindow-private.h
index bd3dfbd46288668c37ddcf01bca5e3c496098817..f9516b6cdfbd2e5aee3d3a0cf344907801b9576d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
+  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
   
   You may not use this file except in compliance with the License.
 #ifndef _MAGICKCORE_XWINDOW_PRIVATE_H
 #define _MAGICKCORE_XWINDOW_PRIVATE_H
 
+#include "MagickCore/draw.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/geometry.h"
+#include "MagickCore/nt-base-private.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/quantize.h"
+
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
@@ -31,10 +38,6 @@ extern "C" {
 #include <X11/keysym.h>
 #include <X11/Xresource.h>
 #include <X11/Xutil.h>
-#include "MagickCore/exception.h"
-#include "MagickCore/geometry.h"
-#include "MagickCore/pixel-accessor.h"
-#include "MagickCore/quantize.h"
 
 #if defined(__cplusplus) || defined(c_plusplus)
 # define klass  c_class
@@ -599,18 +602,20 @@ extern MagickExport XrmDatabase
 static inline double XPixelIntensity(const XColor *pixel)
 {
   double
-    blue,
-    green,
-    red;
-
-  red=ExpandPixelGamma((MagickRealType) pixel->red);
-  green=ExpandPixelGamma((MagickRealType) pixel->green);
-  blue=ExpandPixelGamma((MagickRealType) pixel->blue);
-  return(0.298839f*red+0.586811f*green+0.114350f*blue);
+    intensity;
+
+  if ((pixel->red  == pixel->green) && (pixel->green == pixel->blue))
+    return((double) pixel->red);
+  intensity=0.212656*pixel->red+0.715158*pixel->green+0.072186*pixel->blue;
+  return(intensity);
 }
 
 #endif
 
+extern MagickPrivate MagickBooleanType
+  XRenderImage(Image *,const DrawInfo *,const PointInfo *,TypeMetric *,
+    ExceptionInfo *);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif