cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
Cristy | f6ff9ea | 2016-12-05 09:53:35 -0500 | [diff] [blame] | 2 | Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 | |
Cristy | f19d414 | 2017-04-24 11:34:30 -0400 | [diff] [blame^] | 8 | https://www.imagemagick.org/script/license.php |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 image color methods. |
| 17 | */ |
Cristy | 83bceaa | 2016-06-03 20:39:35 -0400 | [diff] [blame] | 18 | #ifndef MAGICKCORE_COLOR_H |
| 19 | #define MAGICKCORE_COLOR_H |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 20 | |
cristy | 6398ec7 | 2013-11-28 02:00:27 +0000 | [diff] [blame] | 21 | #include "MagickCore/pixel.h" |
| 22 | #include "MagickCore/exception.h" |
| 23 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 24 | #if defined(__cplusplus) || defined(c_plusplus) |
| 25 | extern "C" { |
| 26 | #endif |
| 27 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 28 | typedef enum |
| 29 | { |
| 30 | UndefinedCompliance, |
| 31 | NoCompliance = 0x0000, |
Cristy | 1401044 | 2015-08-15 11:05:42 -0400 | [diff] [blame] | 32 | CSSCompliance = 0x0001, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 33 | SVGCompliance = 0x0001, |
| 34 | X11Compliance = 0x0002, |
| 35 | XPMCompliance = 0x0004, |
| 36 | AllCompliance = 0x7fffffff |
| 37 | } ComplianceType; |
| 38 | |
| 39 | typedef struct _ColorInfo |
| 40 | { |
| 41 | char |
| 42 | *path, |
| 43 | *name; |
| 44 | |
| 45 | ComplianceType |
| 46 | compliance; |
| 47 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 48 | PixelInfo |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 49 | color; |
| 50 | |
| 51 | MagickBooleanType |
cristy | e3e77a1 | 2009-10-16 00:47:21 +0000 | [diff] [blame] | 52 | exempt, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 53 | stealth; |
| 54 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 55 | size_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 56 | signature; |
| 57 | } ColorInfo; |
| 58 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 59 | typedef struct _ErrorInfo |
| 60 | { |
| 61 | double |
| 62 | mean_error_per_pixel, |
| 63 | normalized_mean_error, |
| 64 | normalized_maximum_error; |
| 65 | } ErrorInfo; |
| 66 | |
| 67 | extern MagickExport char |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 68 | **GetColorList(const char *,size_t *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 69 | |
| 70 | extern MagickExport const ColorInfo |
| 71 | *GetColorInfo(const char *,ExceptionInfo *), |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 72 | **GetColorInfoList(const char *,size_t *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 73 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 74 | extern MagickExport MagickBooleanType |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 75 | IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y, |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 76 | ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 77 | ListColorInfo(FILE *,ExceptionInfo *), |
cristy | 101ab70 | 2011-10-13 13:06:32 +0000 | [diff] [blame] | 78 | QueryColorCompliance(const char *,const ComplianceType,PixelInfo *, |
cristy | a60c020 | 2010-07-31 21:36:45 +0000 | [diff] [blame] | 79 | ExceptionInfo *), |
cristy | 269c941 | 2011-10-13 23:41:15 +0000 | [diff] [blame] | 80 | QueryColorname(const Image *,const PixelInfo *,const ComplianceType, |
cristy | 5ff4eaf | 2011-09-03 01:38:02 +0000 | [diff] [blame] | 81 | char *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 82 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 83 | extern MagickExport void |
cristy | ed23157 | 2011-07-14 02:18:59 +0000 | [diff] [blame] | 84 | ConcatenateColorComponent(const PixelInfo *,const PixelChannel, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 85 | const ComplianceType,char *), |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 86 | GetColorTuple(const PixelInfo *,const MagickBooleanType,char *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 87 | |
| 88 | #if defined(__cplusplus) || defined(c_plusplus) |
| 89 | } |
| 90 | #endif |
| 91 | |
| 92 | #endif |