cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
Cristy | 7ce65e7 | 2015-12-12 18:03:16 -0500 | [diff] [blame] | 2 | Copyright 1999-2016 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 | |
| 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 | Wizard the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | ImageMagick test vectors. |
| 17 | */ |
| 18 | #ifndef _IMAGEMAGICK_VALIDATE_H |
| 19 | #define _IMAGEMAGICK_VALIDATE_H |
| 20 | |
| 21 | #define ReferenceFilename "rose:" |
| 22 | #define ReferenceImageFormat "MIFF" |
| 23 | |
| 24 | static const char |
| 25 | *compare_options[] = |
| 26 | { |
cristy | 44097f5 | 2012-12-16 19:56:20 +0000 | [diff] [blame] | 27 | "-metric RMSE -fuzz 5%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 28 | "-metric AE -fuzz 5%", |
| 29 | (const char *) NULL |
| 30 | }; |
| 31 | |
| 32 | static const char |
| 33 | *composite_options[] = |
| 34 | { |
| 35 | "", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 36 | "-compose Atop", |
| 37 | "-compose Blend", |
| 38 | "-compose Bumpmap", |
| 39 | "-compose ChangeMask", |
| 40 | "-compose Clear", |
| 41 | "-compose ColorBurn", |
| 42 | "-compose ColorDodge", |
| 43 | "-compose Colorize", |
| 44 | "-compose CopyBlack", |
| 45 | "-compose CopyBlue", |
| 46 | "-compose CopyCyan", |
| 47 | "-compose CopyGreen", |
| 48 | "-compose Copy", |
| 49 | "-compose CopyMagenta", |
| 50 | "-compose CopyOpacity", |
| 51 | "-compose CopyRed", |
| 52 | "-compose CopyYellow", |
| 53 | "-compose Darken", |
| 54 | "-compose Divide", |
| 55 | "-compose Dst", |
| 56 | "-compose Difference", |
| 57 | "-compose Displace", |
| 58 | "-compose Dissolve", |
| 59 | "-compose DstAtop", |
| 60 | "-compose DstIn", |
| 61 | "-compose DstOut", |
| 62 | "-compose DstOver", |
| 63 | "-compose Dst", |
| 64 | "-compose Exclusion", |
| 65 | "-compose HardLight", |
| 66 | "-compose Hue", |
| 67 | "-compose In", |
| 68 | "-compose Lighten", |
| 69 | "-compose LinearLight", |
| 70 | "-compose Luminize", |
| 71 | "-compose Minus", |
| 72 | "-compose Modulate", |
cristy | bae8cb6 | 2014-05-27 00:17:34 +0000 | [diff] [blame] | 73 | "-compose ModulusAdd", |
| 74 | "-compose ModulusSubtract", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 75 | "-compose Multiply", |
| 76 | "-compose None", |
| 77 | "-compose Out", |
| 78 | "-compose Overlay", |
| 79 | "-compose Over", |
| 80 | "-compose Plus", |
| 81 | "-compose Replace", |
| 82 | "-compose Saturate", |
| 83 | "-compose Screen", |
| 84 | "-compose SoftLight", |
| 85 | "-compose Src", |
| 86 | "-compose SrcAtop", |
| 87 | "-compose SrcIn", |
| 88 | "-compose SrcOut", |
| 89 | "-compose SrcOver", |
| 90 | "-compose Src", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 91 | "-compose Threshold", |
| 92 | "-compose Xor", |
| 93 | "-geometry +35+65 -label Magick", |
| 94 | (const char *) NULL |
| 95 | }; |
| 96 | |
| 97 | static const char |
| 98 | *convert_options[] = |
| 99 | { |
| 100 | "-noop", |
| 101 | "-affine 1,0,0.785,1,0,0 -transform", |
| 102 | "-black-threshold 20%", |
| 103 | "-blur 0x0.5", |
| 104 | "-border 6x6", |
cristy | 85636be | 2014-04-04 19:16:53 +0000 | [diff] [blame] | 105 | "-canny 0x1+10%+80%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 106 | "-charcoal 0x1", |
| 107 | "-chop 8x6+20+30", |
| 108 | "-colors 16", |
| 109 | "-colorspace CMYK", |
| 110 | "-colorspace GRAY", |
| 111 | "-colorspace HSL", |
| 112 | "-colorspace HWB", |
| 113 | "-colorspace OHTA", |
| 114 | "-colorspace YCbCr", |
| 115 | "-colorspace YIQ", |
| 116 | "-colorspace YUV", |
| 117 | "-contrast", |
| 118 | "+contrast", |
| 119 | "-convolve 1,1,1,1,4,1,1,1,1", |
| 120 | "-colorize 30%/20%/50%", |
| 121 | "-crop 17x9+10+10", |
| 122 | "-cycle 200", |
| 123 | "-despeckle", |
| 124 | "-draw \"rectangle 20,10 80,50\"", |
| 125 | "-edge 0x1", |
| 126 | "-emboss 0x1", |
| 127 | "-enhance", |
| 128 | "-equalize", |
| 129 | "-flip", |
| 130 | "-flop", |
| 131 | "-frame 15x15+3+3", |
| 132 | "-fx \"(1.0/(1.0+exp(10.0*(0.5-u)))-0.006693)*1.0092503\"", |
| 133 | "-gamma 1.6", |
| 134 | "-gaussian 0x0.5", |
| 135 | "-implode 0.5", |
| 136 | "-implode -1", |
| 137 | "-label Magick", |
| 138 | "-lat 10x10-5%", |
| 139 | "-level 10%,1.2,90%", |
| 140 | "-map netscape:", |
| 141 | "-median 2", |
| 142 | "-modulate 110/100/95", |
| 143 | "-monochrome", |
| 144 | "-motion-blur 0x3+30", |
| 145 | "-negate", |
| 146 | "+noise Uniform", |
| 147 | "+noise Gaussian", |
| 148 | "+noise Multiplicative", |
| 149 | "+noise Impulse", |
| 150 | "+noise Laplacian", |
| 151 | "+noise Poisson", |
| 152 | "-noise 2", |
| 153 | "-normalize", |
| 154 | "-fill blue -fuzz 35% -opaque red", |
| 155 | "-ordered-dither 2x2", |
| 156 | "-paint 0x1", |
| 157 | "-raise 10x10", |
| 158 | "-random-threshold 10%", |
cristy | bae8cb6 | 2014-05-27 00:17:34 +0000 | [diff] [blame] | 159 | "-color-matrix '0.9 0 0, 0 0.9 0, 0 0 1.2'", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 160 | "-density 75x75 -resample 50x50", |
| 161 | "-resize 10%", |
| 162 | "-resize 50%", |
Cristy | cc3dc5c | 2015-11-01 20:14:11 -0500 | [diff] [blame] | 163 | "-resize 50x150%", |
| 164 | "-resize 100%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 165 | "-resize 150%", |
Cristy | cc3dc5c | 2015-11-01 20:14:11 -0500 | [diff] [blame] | 166 | "-resize 150x75%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 167 | "-roll +20+10", |
| 168 | "-rotate 0", |
| 169 | "-rotate 45", |
| 170 | "-rotate 90", |
| 171 | "-rotate 180", |
| 172 | "-rotate 270", |
| 173 | "-sample 5%", |
| 174 | "-sample 50%", |
Cristy | cc3dc5c | 2015-11-01 20:14:11 -0500 | [diff] [blame] | 175 | "-sample 50x150%", |
| 176 | "-sample 100%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 177 | "-sample 150%", |
Cristy | cc3dc5c | 2015-11-01 20:14:11 -0500 | [diff] [blame] | 178 | "-sample 150x50%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 179 | "-scale 5%", |
| 180 | "-scale 50%", |
Cristy | cc3dc5c | 2015-11-01 20:14:11 -0500 | [diff] [blame] | 181 | "-scale 50x150%", |
| 182 | "-scale 100%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 183 | "-scale 150%", |
Cristy | cc3dc5c | 2015-11-01 20:14:11 -0500 | [diff] [blame] | 184 | "-scale 150x50%", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 185 | "-segment 1x1.5", |
| 186 | "-shade 30x30", |
| 187 | "-sharpen 0x1.0", |
| 188 | "-shave 10x10", |
| 189 | "-shear 45x45", |
| 190 | "-size 130x194", |
| 191 | "-solarize 50%", |
| 192 | "-spread 3", |
| 193 | "-swirl 90", |
| 194 | "-threshold 35%", |
| 195 | "-fuzz 35% -transparent red", |
| 196 | "-fuzz 5% -trim", |
| 197 | "-unsharp 0x1.0+20+1", |
| 198 | "-wave 25x150", |
| 199 | "-white-threshold 80%", |
| 200 | (const char *) NULL |
| 201 | }; |
| 202 | |
| 203 | static const char |
| 204 | *identify_options[] = |
| 205 | { |
| 206 | "", |
| 207 | "-verbose", |
cristy | 3e3b219 | 2010-03-03 03:06:13 +0000 | [diff] [blame] | 208 | "-features 1 -verbose", |
| 209 | "-unique -verbose", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 210 | (const char *) NULL |
| 211 | }; |
| 212 | |
| 213 | static const char |
| 214 | *montage_options[] = |
| 215 | { |
| 216 | "", |
| 217 | "-frame 5", |
| 218 | "-geometry 13x19+10+5 -gravity Center", |
| 219 | "-label %f", |
| 220 | "-pointsize 10", |
| 221 | "-shadow", |
| 222 | "-tile 3x3", |
| 223 | (const char *) NULL |
| 224 | }; |
| 225 | |
| 226 | static const char |
| 227 | *stream_options[] = |
| 228 | { |
| 229 | "", |
| 230 | (const char *) NULL |
| 231 | }; |
| 232 | |
| 233 | struct ReferenceFormats |
| 234 | { |
| 235 | const char |
| 236 | *magick; |
| 237 | |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 238 | CompressionType |
| 239 | compression; |
| 240 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 241 | double |
| 242 | fuzz; |
| 243 | }; |
| 244 | |
| 245 | static const struct ReferenceFormats |
| 246 | reference_formats[] = |
| 247 | { |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 248 | { "ART", UndefinedCompression, 0.0 }, |
| 249 | { "AVS", UndefinedCompression, 0.0 }, |
| 250 | { "BMP", UndefinedCompression, 0.0 }, |
Cristy | 087a059 | 2015-08-30 16:40:35 -0400 | [diff] [blame] | 251 | { "BMP2", UndefinedCompression, 0.0 }, |
| 252 | { "BMP3", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 253 | { "CIN", UndefinedCompression, 0.0 }, |
| 254 | { "CMYK", UndefinedCompression, 0.0 }, |
| 255 | { "CMYKA", UndefinedCompression, 0.0 }, |
| 256 | { "CUT", UndefinedCompression, 0.0 }, |
| 257 | { "DCM", UndefinedCompression, 0.0 }, |
| 258 | { "DCR", UndefinedCompression, 0.0 }, |
| 259 | { "DCX", UndefinedCompression, 0.0 }, |
| 260 | { "DDS", UndefinedCompression, 0.0 }, |
| 261 | { "DFONT", UndefinedCompression, 0.0 }, |
| 262 | { "DJVU", UndefinedCompression, 0.0 }, |
| 263 | { "DNG", UndefinedCompression, 0.0 }, |
| 264 | { "DOT", UndefinedCompression, 0.0 }, |
| 265 | { "DPS", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 266 | { "DPX", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 267 | { "ERF", UndefinedCompression, 0.0 }, |
| 268 | { "EXR", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 269 | { "FPX", UndefinedCompression, 0.0 }, |
| 270 | { "FRACTAL", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 271 | { "GIF", UndefinedCompression, 0.0 }, |
| 272 | { "GIF87", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 273 | { "GRAY", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 274 | { "HTM", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 275 | { "HTML", UndefinedCompression, 0.0 }, |
| 276 | { "ICB", UndefinedCompression, 0.0 }, |
| 277 | { "ICO", UndefinedCompression, 0.0 }, |
| 278 | { "ICON", UndefinedCompression, 0.0 }, |
| 279 | { "INFO", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 280 | { "JBG", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 281 | { "JNG", UndefinedCompression, 0.004 }, |
| 282 | { "JNG", JPEGCompression, 0.004 }, |
| 283 | { "JP2", UndefinedCompression, 0.004 }, |
| 284 | { "J2K", UndefinedCompression, 0.004 }, |
| 285 | { "JPEG", UndefinedCompression, 0.004 }, |
| 286 | { "JPG", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 287 | { "K25", UndefinedCompression, 0.0 }, |
| 288 | { "KDC", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 289 | { "MATTE", UndefinedCompression, 0.0 }, |
| 290 | { "MIFF", UndefinedCompression, 0.0 }, |
| 291 | { "MNG", UndefinedCompression, 0.0 }, |
| 292 | { "MONO", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 293 | { "MRW", UndefinedCompression, 0.0 }, |
| 294 | { "MTV", UndefinedCompression, 0.0 }, |
| 295 | { "NEF", UndefinedCompression, 0.0 }, |
| 296 | { "ORF", UndefinedCompression, 0.0 }, |
| 297 | { "OTB", UndefinedCompression, 0.0 }, |
| 298 | { "OTF", UndefinedCompression, 0.0 }, |
| 299 | { "PAL", UndefinedCompression, 0.0 }, |
| 300 | { "PAM", UndefinedCompression, 0.0 }, |
| 301 | { "PBM", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 302 | { "PCT", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 303 | { "PCX", UndefinedCompression, 0.0 }, |
| 304 | { "PEF", UndefinedCompression, 0.0 }, |
| 305 | { "PFA", UndefinedCompression, 0.0 }, |
| 306 | { "PFB", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 307 | { "PFM", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 308 | { "PGM", UndefinedCompression, 0.0 }, |
| 309 | { "PGX", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 310 | { "PICT", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 311 | { "PIX", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 312 | { "PJPEG", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 313 | { "PLASMA", UndefinedCompression, 0.0 }, |
| 314 | { "PNG", UndefinedCompression, 0.0 }, |
glennrp | 4d3ddd8 | 2012-12-11 14:14:28 +0000 | [diff] [blame] | 315 | { "PNG8", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 316 | { "PNG24", UndefinedCompression, 0.0 }, |
| 317 | { "PNG32", UndefinedCompression, 0.0 }, |
glennrp | b49fd61 | 2013-01-26 21:25:45 +0000 | [diff] [blame] | 318 | { "PNG48", UndefinedCompression, 0.0 }, |
| 319 | { "PNG64", UndefinedCompression, 0.0 }, |
glennrp | 5830fbc | 2013-01-27 06:11:45 +0000 | [diff] [blame] | 320 | { "PNG00", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 321 | { "PNM", UndefinedCompression, 0.0 }, |
| 322 | { "PPM", UndefinedCompression, 0.0 }, |
| 323 | { "PREVIEW", UndefinedCompression, 0.0 }, |
| 324 | { "PTIF", UndefinedCompression, 0.0 }, |
| 325 | { "PWP", UndefinedCompression, 0.0 }, |
| 326 | { "RADIAL-GR", UndefinedCompression, 0.0 }, |
| 327 | { "RAF", UndefinedCompression, 0.0 }, |
| 328 | { "RAS", UndefinedCompression, 0.0 }, |
| 329 | { "RGB", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 330 | { "RGBA", UndefinedCompression, 0.004 }, |
| 331 | { "RGBO", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 332 | { "RLA", UndefinedCompression, 0.0 }, |
| 333 | { "RLE", UndefinedCompression, 0.0 }, |
| 334 | { "SCR", UndefinedCompression, 0.0 }, |
| 335 | { "SCT", UndefinedCompression, 0.0 }, |
| 336 | { "SFW", UndefinedCompression, 0.0 }, |
| 337 | { "SGI", UndefinedCompression, 0.0 }, |
| 338 | { "SHTML", UndefinedCompression, 0.0 }, |
| 339 | { "SR2", UndefinedCompression, 0.0 }, |
| 340 | { "SRF", UndefinedCompression, 0.0 }, |
| 341 | { "STEGANO", UndefinedCompression, 0.0 }, |
| 342 | { "SUN", UndefinedCompression, 0.0 }, |
| 343 | { "TGA", UndefinedCompression, 0.0 }, |
| 344 | { "TIFF", UndefinedCompression, 0.0 }, |
| 345 | { "TIFF64", UndefinedCompression, 0.0 }, |
| 346 | { "TILE", UndefinedCompression, 0.0 }, |
| 347 | { "TIM", UndefinedCompression, 0.0 }, |
| 348 | { "TTC", UndefinedCompression, 0.0 }, |
| 349 | { "TTF", UndefinedCompression, 0.0 }, |
| 350 | { "TXT", UndefinedCompression, 0.0 }, |
| 351 | { "UIL", UndefinedCompression, 0.0 }, |
| 352 | { "UYVY", UndefinedCompression, 0.0 }, |
| 353 | { "VDA", UndefinedCompression, 0.0 }, |
| 354 | { "VICAR", UndefinedCompression, 0.0 }, |
cristy | a010f1a | 2014-03-29 14:00:24 +0000 | [diff] [blame] | 355 | { "VIFF", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 356 | { "VST", UndefinedCompression, 0.0 }, |
| 357 | { "WBMP", UndefinedCompression, 0.0 }, |
| 358 | { "WPG", UndefinedCompression, 0.0 }, |
| 359 | { "X3F", UndefinedCompression, 0.0 }, |
| 360 | { "XBM", UndefinedCompression, 0.0 }, |
| 361 | { "XCF", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 362 | { "XPM", UndefinedCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 363 | { "XPS", UndefinedCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 364 | { "XV", UndefinedCompression, 0.004 }, |
cristy | 0157aea | 2010-04-24 21:12:18 +0000 | [diff] [blame] | 365 | #if !defined(MAGICKCORE_WINDOWS_SUPPORT) |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 366 | { "XWD", UndefinedCompression, 0.0 }, |
cristy | 3193926 | 2009-09-15 00:23:11 +0000 | [diff] [blame] | 367 | #endif |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 368 | { "YUV", UndefinedCompression, 0.0 }, |
| 369 | { "YCbCr", UndefinedCompression, 0.0 }, |
cristy | 2032fc9 | 2012-12-30 22:17:37 +0000 | [diff] [blame] | 370 | { "YCbCrA", UndefinedCompression, 0.0 }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 371 | #if defined(MAGICKCORE_GS_DELEGATE) |
cristy | 2ce75af | 2009-10-09 17:57:50 +0000 | [diff] [blame] | 372 | { "AI", UndefinedCompression, 0.0 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 373 | { "EPDF", UndefinedCompression, 0.0 }, |
| 374 | { "EPI", UndefinedCompression, 0.0 }, |
| 375 | { "EPS", UndefinedCompression, 0.0 }, |
| 376 | { "EPS2", UndefinedCompression, 0.0 }, |
| 377 | { "EPS3", UndefinedCompression, 0.0 }, |
| 378 | { "EPSF", UndefinedCompression, 0.0 }, |
| 379 | { "EPSI", UndefinedCompression, 0.0 }, |
| 380 | { "EPT", UndefinedCompression, 0.0 }, |
| 381 | { "PDF", UndefinedCompression, 0.0 }, |
| 382 | { "PDF", ZipCompression, 0.0 }, |
| 383 | { "PDF", FaxCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 384 | { "PDF", JPEGCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 385 | { "PDF", RLECompression, 0.0 }, |
| 386 | { "PDF", LZWCompression, 0.0 }, |
| 387 | { "PDFA", UndefinedCompression, 0.0 }, |
| 388 | { "PS", UndefinedCompression, 0.0 }, |
| 389 | { "PS2", UndefinedCompression, 0.0 }, |
| 390 | { "PS3", UndefinedCompression, 0.0 }, |
| 391 | { "PS3", ZipCompression, 0.0 }, |
| 392 | { "PS3", FaxCompression, 0.0 }, |
cristy | 304eaf0 | 2014-03-29 13:49:42 +0000 | [diff] [blame] | 393 | { "PS3", JPEGCompression, 0.004 }, |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 394 | { "PS3", RLECompression, 0.0 }, |
| 395 | { "PS3", LZWCompression, 0.0 }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 396 | #endif |
cristy | 7998e5f | 2009-10-08 02:45:33 +0000 | [diff] [blame] | 397 | { (const char *) NULL, UndefinedCompression, 0.0 } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 398 | }; |
| 399 | |
| 400 | static const char |
| 401 | *reference_map[] = |
| 402 | { |
| 403 | "bgro", |
| 404 | "bgrp", |
| 405 | "bgr", |
| 406 | "cmyk", |
| 407 | "cmy", |
| 408 | "i", |
| 409 | "prgb", |
| 410 | "rgba", |
| 411 | "rgbo", |
| 412 | "rgb", |
| 413 | (char *) NULL |
| 414 | }; |
| 415 | |
| 416 | struct ReferenceStorage |
| 417 | { |
| 418 | StorageType |
| 419 | type; |
| 420 | |
| 421 | size_t |
| 422 | quantum; |
| 423 | }; |
| 424 | |
| 425 | static const struct ReferenceStorage |
| 426 | reference_storage[] = |
| 427 | { |
| 428 | { CharPixel, sizeof(unsigned char) }, |
| 429 | { DoublePixel, sizeof(double) }, |
| 430 | { FloatPixel, sizeof(float) }, |
cristy | 100b8d9 | 2012-01-08 00:32:49 +0000 | [diff] [blame] | 431 | { LongPixel, sizeof(unsigned int) }, |
| 432 | { LongLongPixel, sizeof(MagickSizeType) }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 433 | { ShortPixel, sizeof(unsigned short) }, |
| 434 | { UndefinedPixel, 0 } |
| 435 | }; |
| 436 | |
| 437 | struct ReferenceTypes |
| 438 | { |
| 439 | ImageType |
| 440 | type; |
| 441 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 442 | size_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 443 | depth; |
| 444 | }; |
| 445 | |
| 446 | static const struct ReferenceTypes |
| 447 | reference_types[] = |
| 448 | { |
| 449 | { TrueColorType, 8 }, |
cristy | def23e5 | 2015-01-22 11:52:01 +0000 | [diff] [blame] | 450 | { TrueColorAlphaType, 8 }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 451 | { GrayscaleType, 8 }, |
cristy | def23e5 | 2015-01-22 11:52:01 +0000 | [diff] [blame] | 452 | { GrayscaleAlphaType, 8 }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 453 | { PaletteType, 8 }, |
cristy | def23e5 | 2015-01-22 11:52:01 +0000 | [diff] [blame] | 454 | { PaletteAlphaType, 8 }, |
| 455 | { PaletteBilevelAlphaType, 8 }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 456 | { BilevelType, 1 }, |
| 457 | { ColorSeparationType, 8 }, |
cristy | def23e5 | 2015-01-22 11:52:01 +0000 | [diff] [blame] | 458 | { ColorSeparationAlphaType, 8 }, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 459 | { TrueColorType, 10 }, |
| 460 | { TrueColorType, 12 }, |
| 461 | { TrueColorType, 16 }, |
cristy | 5f1c1ff | 2010-12-23 21:38:06 +0000 | [diff] [blame] | 462 | { UndefinedType, 0 } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 463 | }; |
| 464 | |
| 465 | #endif |