From: cristy Date: Sun, 3 Jul 2011 00:58:03 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~7369 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a677852281c500639d8c4d7c4e4f10ec625362b;p=imagemagick --- diff --git a/MagickCore/pixel-accessor.h b/MagickCore/pixel-accessor.h index a42b43b00..c838378ec 100644 --- a/MagickCore/pixel-accessor.h +++ b/MagickCore/pixel-accessor.h @@ -1,12 +1,12 @@ /* Copyright 1999-2011 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. obtain a copy of the License at - + http://www.imagemagick.org/script/license.php - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -90,7 +90,7 @@ static inline Quantum GetPixelInfoLuminance(const PixelInfo *pixel_info) { Quantum luminance; - + #if !defined(MAGICKCORE_HDRI_SUPPORT) luminance=(Quantum) (0.21267*pixel_info->red+0.71516*pixel_info->green+ 0.07217*pixel_info->blue+0.5); @@ -147,6 +147,12 @@ static inline Quantum GetPixelPacketIntensity(const PixelPacket *pixel) #endif } +static inline PixelTrait GetPixelTrait(const Image *image, + const PixelComponent component) +{ + return(image->component_map[component].trait); +} + static inline Quantum GetPixelY(const Image *image,const Quantum *pixel) { return(pixel[image->component_map[YPixelComponent].component]); diff --git a/MagickCore/pixel.h b/MagickCore/pixel.h index 36e94dcb5..05e59e6f2 100644 --- a/MagickCore/pixel.h +++ b/MagickCore/pixel.h @@ -58,7 +58,10 @@ typedef enum typedef enum { - UndefinedPixelTrait + UndefinedPixelTrait, + AlphaPixelTrait, + IgnorePixelTrait, + UnusedPixelTrait } PixelTrait; typedef struct _PixelComponentMap