blob: c82bfe31197e632a564e22ba78db1d528ad5ba64 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy45ef08f2012-12-07 13:13:34 +00002 Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 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
24static const char
25 *compare_options[] =
26 {
cristy44097f52012-12-16 19:56:20 +000027 "-metric RMSE -fuzz 5%",
cristy3ed852e2009-09-05 21:47:34 +000028 "-metric AE -fuzz 5%",
29 (const char *) NULL
30 };
31
32static const char
33 *composite_options[] =
34 {
35 "",
36 "-compose Add",
37 "-compose Atop",
38 "-compose Blend",
39 "-compose Bumpmap",
40 "-compose ChangeMask",
41 "-compose Clear",
42 "-compose ColorBurn",
43 "-compose ColorDodge",
44 "-compose Colorize",
45 "-compose CopyBlack",
46 "-compose CopyBlue",
47 "-compose CopyCyan",
48 "-compose CopyGreen",
49 "-compose Copy",
50 "-compose CopyMagenta",
51 "-compose CopyOpacity",
52 "-compose CopyRed",
53 "-compose CopyYellow",
54 "-compose Darken",
55 "-compose Divide",
56 "-compose Dst",
57 "-compose Difference",
58 "-compose Displace",
59 "-compose Dissolve",
60 "-compose DstAtop",
61 "-compose DstIn",
62 "-compose DstOut",
63 "-compose DstOver",
64 "-compose Dst",
65 "-compose Exclusion",
66 "-compose HardLight",
67 "-compose Hue",
68 "-compose In",
69 "-compose Lighten",
70 "-compose LinearLight",
71 "-compose Luminize",
72 "-compose Minus",
73 "-compose Modulate",
74 "-compose Multiply",
75 "-compose None",
76 "-compose Out",
77 "-compose Overlay",
78 "-compose Over",
79 "-compose Plus",
80 "-compose Replace",
81 "-compose Saturate",
82 "-compose Screen",
83 "-compose SoftLight",
84 "-compose Src",
85 "-compose SrcAtop",
86 "-compose SrcIn",
87 "-compose SrcOut",
88 "-compose SrcOver",
89 "-compose Src",
90 "-compose Subtract",
91 "-compose Threshold",
92 "-compose Xor",
93 "-geometry +35+65 -label Magick",
94 (const char *) NULL
95 };
96
97static 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",
105 "-charcoal 0x1",
106 "-chop 8x6+20+30",
107 "-colors 16",
108 "-colorspace CMYK",
109 "-colorspace GRAY",
110 "-colorspace HSL",
111 "-colorspace HWB",
112 "-colorspace OHTA",
113 "-colorspace YCbCr",
114 "-colorspace YIQ",
115 "-colorspace YUV",
116 "-contrast",
117 "+contrast",
118 "-convolve 1,1,1,1,4,1,1,1,1",
119 "-colorize 30%/20%/50%",
120 "-crop 17x9+10+10",
121 "-cycle 200",
122 "-despeckle",
123 "-draw \"rectangle 20,10 80,50\"",
124 "-edge 0x1",
125 "-emboss 0x1",
126 "-enhance",
127 "-equalize",
128 "-flip",
129 "-flop",
130 "-frame 15x15+3+3",
131 "-fx \"(1.0/(1.0+exp(10.0*(0.5-u)))-0.006693)*1.0092503\"",
132 "-gamma 1.6",
133 "-gaussian 0x0.5",
134 "-implode 0.5",
135 "-implode -1",
136 "-label Magick",
137 "-lat 10x10-5%",
138 "-level 10%,1.2,90%",
139 "-map netscape:",
140 "-median 2",
141 "-modulate 110/100/95",
142 "-monochrome",
143 "-motion-blur 0x3+30",
144 "-negate",
145 "+noise Uniform",
146 "+noise Gaussian",
147 "+noise Multiplicative",
148 "+noise Impulse",
149 "+noise Laplacian",
150 "+noise Poisson",
151 "-noise 2",
152 "-normalize",
153 "-fill blue -fuzz 35% -opaque red",
154 "-ordered-dither 2x2",
155 "-paint 0x1",
156 "-raise 10x10",
157 "-random-threshold 10%",
158 "-recolor '0.9 0 0, 0 0.9 0, 0 0 1.2'",
159 "-density 75x75 -resample 50x50",
160 "-resize 10%",
161 "-resize 50%",
162 "-resize 150%",
163 "-roll +20+10",
164 "-rotate 0",
165 "-rotate 45",
166 "-rotate 90",
167 "-rotate 180",
168 "-rotate 270",
169 "-sample 5%",
170 "-sample 50%",
171 "-sample 150%",
172 "-scale 5%",
173 "-scale 50%",
174 "-scale 150%",
175 "-segment 1x1.5",
176 "-shade 30x30",
177 "-sharpen 0x1.0",
178 "-shave 10x10",
179 "-shear 45x45",
180 "-size 130x194",
181 "-solarize 50%",
182 "-spread 3",
183 "-swirl 90",
184 "-threshold 35%",
185 "-fuzz 35% -transparent red",
186 "-fuzz 5% -trim",
187 "-unsharp 0x1.0+20+1",
188 "-wave 25x150",
189 "-white-threshold 80%",
190 (const char *) NULL
191 };
192
193static const char
194 *identify_options[] =
195 {
196 "",
197 "-verbose",
cristy3e3b2192010-03-03 03:06:13 +0000198 "-features 1 -verbose",
199 "-unique -verbose",
cristy3ed852e2009-09-05 21:47:34 +0000200 (const char *) NULL
201 };
202
203static const char
204 *montage_options[] =
205 {
206 "",
207 "-frame 5",
208 "-geometry 13x19+10+5 -gravity Center",
209 "-label %f",
210 "-pointsize 10",
211 "-shadow",
212 "-tile 3x3",
213 (const char *) NULL
214 };
215
216static const char
217 *stream_options[] =
218 {
219 "",
220 (const char *) NULL
221 };
222
223struct ReferenceFormats
224{
225 const char
226 *magick;
227
cristy7998e5f2009-10-08 02:45:33 +0000228 CompressionType
229 compression;
230
cristy3ed852e2009-09-05 21:47:34 +0000231 double
232 fuzz;
233};
234
235static const struct ReferenceFormats
236 reference_formats[] =
237 {
cristy7998e5f2009-10-08 02:45:33 +0000238 { "ART", UndefinedCompression, 0.0 },
239 { "AVS", UndefinedCompression, 0.0 },
240 { "BMP", UndefinedCompression, 0.0 },
241 { "CIN", UndefinedCompression, 0.0 },
242 { "CMYK", UndefinedCompression, 0.0 },
243 { "CMYKA", UndefinedCompression, 0.0 },
244 { "CUT", UndefinedCompression, 0.0 },
245 { "DCM", UndefinedCompression, 0.0 },
246 { "DCR", UndefinedCompression, 0.0 },
247 { "DCX", UndefinedCompression, 0.0 },
248 { "DDS", UndefinedCompression, 0.0 },
249 { "DFONT", UndefinedCompression, 0.0 },
250 { "DJVU", UndefinedCompression, 0.0 },
251 { "DNG", UndefinedCompression, 0.0 },
252 { "DOT", UndefinedCompression, 0.0 },
253 { "DPS", UndefinedCompression, 0.0 },
cristybe1535a2010-12-24 21:38:38 +0000254 { "DPX", UndefinedCompression, 0.003 },
cristy7998e5f2009-10-08 02:45:33 +0000255 { "ERF", UndefinedCompression, 0.0 },
256 { "EXR", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000257 { "FPX", UndefinedCompression, 0.0 },
258 { "FRACTAL", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000259 { "GIF", UndefinedCompression, 0.0 },
260 { "GIF87", UndefinedCompression, 0.0 },
cristy2911ab52012-01-12 15:08:23 +0000261 { "GRAY", UndefinedCompression, 0.003 },
cristy7998e5f2009-10-08 02:45:33 +0000262 { "HTM", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000263 { "HTML", UndefinedCompression, 0.0 },
264 { "ICB", UndefinedCompression, 0.0 },
265 { "ICO", UndefinedCompression, 0.0 },
266 { "ICON", UndefinedCompression, 0.0 },
267 { "INFO", UndefinedCompression, 0.0 },
268 { "INLINE", UndefinedCompression, 0.0 },
269 { "JBG", UndefinedCompression, 0.0 },
270 { "JNG", UndefinedCompression, 0.003 },
glennrp5afcbb12012-12-12 13:55:56 +0000271 { "JNG", JPEGCompression, 0.003 },
cristy7f5167a2012-06-03 16:00:08 +0000272 { "JP2", UndefinedCompression, 0.003 },
273 { "JPC", UndefinedCompression, 0.003 },
cristy7998e5f2009-10-08 02:45:33 +0000274 { "JPEG", UndefinedCompression, 0.003 },
275 { "JPG", UndefinedCompression, 0.003 },
276 { "K25", UndefinedCompression, 0.0 },
277 { "KDC", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000278 { "MATTE", UndefinedCompression, 0.0 },
279 { "MIFF", UndefinedCompression, 0.0 },
280 { "MNG", UndefinedCompression, 0.0 },
281 { "MONO", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000282 { "MRW", UndefinedCompression, 0.0 },
283 { "MTV", UndefinedCompression, 0.0 },
284 { "NEF", UndefinedCompression, 0.0 },
285 { "ORF", UndefinedCompression, 0.0 },
286 { "OTB", UndefinedCompression, 0.0 },
287 { "OTF", UndefinedCompression, 0.0 },
288 { "PAL", UndefinedCompression, 0.0 },
289 { "PAM", UndefinedCompression, 0.0 },
290 { "PBM", UndefinedCompression, 0.0 },
291 { "PCT", UndefinedCompression, 0.003 },
292 { "PCX", UndefinedCompression, 0.0 },
293 { "PEF", UndefinedCompression, 0.0 },
294 { "PFA", UndefinedCompression, 0.0 },
295 { "PFB", UndefinedCompression, 0.0 },
cristy6abd4192012-06-22 13:42:48 +0000296 { "PFM", UndefinedCompression, 0.003 },
cristy7998e5f2009-10-08 02:45:33 +0000297 { "PGM", UndefinedCompression, 0.0 },
298 { "PGX", UndefinedCompression, 0.0 },
cristy205f7f02011-04-15 17:37:37 +0000299#if !defined(MAGICKCORE_HDRI_SUPPORT)
cristy7998e5f2009-10-08 02:45:33 +0000300 { "PICT", UndefinedCompression, 0.003 },
cristy205f7f02011-04-15 17:37:37 +0000301#endif
cristy7998e5f2009-10-08 02:45:33 +0000302 { "PIX", UndefinedCompression, 0.0 },
303 { "PJPEG", UndefinedCompression, 0.003 },
304 { "PLASMA", UndefinedCompression, 0.0 },
305 { "PNG", UndefinedCompression, 0.0 },
glennrp4d3ddd82012-12-11 14:14:28 +0000306 { "PNG8", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000307 { "PNG24", UndefinedCompression, 0.0 },
308 { "PNG32", UndefinedCompression, 0.0 },
glennrpb49fd612013-01-26 21:25:45 +0000309 { "PNG48", UndefinedCompression, 0.0 },
310 { "PNG64", UndefinedCompression, 0.0 },
glennrp5830fbc2013-01-27 06:11:45 +0000311 { "PNG00", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000312 { "PNM", UndefinedCompression, 0.0 },
313 { "PPM", UndefinedCompression, 0.0 },
314 { "PREVIEW", UndefinedCompression, 0.0 },
315 { "PTIF", UndefinedCompression, 0.0 },
316 { "PWP", UndefinedCompression, 0.0 },
317 { "RADIAL-GR", UndefinedCompression, 0.0 },
318 { "RAF", UndefinedCompression, 0.0 },
319 { "RAS", UndefinedCompression, 0.0 },
320 { "RGB", UndefinedCompression, 0.0 },
321 { "RGBA", UndefinedCompression, 0.003 },
cristyeec18db2010-03-03 21:15:45 +0000322 { "RGBO", UndefinedCompression, 0.003 },
cristy7998e5f2009-10-08 02:45:33 +0000323 { "RLA", UndefinedCompression, 0.0 },
324 { "RLE", UndefinedCompression, 0.0 },
325 { "SCR", UndefinedCompression, 0.0 },
326 { "SCT", UndefinedCompression, 0.0 },
327 { "SFW", UndefinedCompression, 0.0 },
328 { "SGI", UndefinedCompression, 0.0 },
329 { "SHTML", UndefinedCompression, 0.0 },
330 { "SR2", UndefinedCompression, 0.0 },
331 { "SRF", UndefinedCompression, 0.0 },
332 { "STEGANO", UndefinedCompression, 0.0 },
333 { "SUN", UndefinedCompression, 0.0 },
334 { "TGA", UndefinedCompression, 0.0 },
335 { "TIFF", UndefinedCompression, 0.0 },
336 { "TIFF64", UndefinedCompression, 0.0 },
337 { "TILE", UndefinedCompression, 0.0 },
338 { "TIM", UndefinedCompression, 0.0 },
339 { "TTC", UndefinedCompression, 0.0 },
340 { "TTF", UndefinedCompression, 0.0 },
341 { "TXT", UndefinedCompression, 0.0 },
342 { "UIL", UndefinedCompression, 0.0 },
343 { "UYVY", UndefinedCompression, 0.0 },
344 { "VDA", UndefinedCompression, 0.0 },
345 { "VICAR", UndefinedCompression, 0.0 },
346 { "VIFF", UndefinedCompression, 0.0 },
347 { "VST", UndefinedCompression, 0.0 },
348 { "WBMP", UndefinedCompression, 0.0 },
349 { "WPG", UndefinedCompression, 0.0 },
350 { "X3F", UndefinedCompression, 0.0 },
351 { "XBM", UndefinedCompression, 0.0 },
352 { "XCF", UndefinedCompression, 0.0 },
353 { "XPM", UndefinedCompression, 0.0 },
354 { "XPS", UndefinedCompression, 0.0 },
355 { "XV", UndefinedCompression, 0.0 },
cristy0157aea2010-04-24 21:12:18 +0000356#if !defined(MAGICKCORE_WINDOWS_SUPPORT)
cristy7998e5f2009-10-08 02:45:33 +0000357 { "XWD", UndefinedCompression, 0.0 },
cristy31939262009-09-15 00:23:11 +0000358#endif
cristy7998e5f2009-10-08 02:45:33 +0000359 { "YUV", UndefinedCompression, 0.0 },
360 { "YCbCr", UndefinedCompression, 0.0 },
cristy2032fc92012-12-30 22:17:37 +0000361 { "YCbCrA", UndefinedCompression, 0.0 },
cristy3ed852e2009-09-05 21:47:34 +0000362#if defined(MAGICKCORE_GS_DELEGATE)
cristy2ce75af2009-10-09 17:57:50 +0000363 { "AI", UndefinedCompression, 0.0 },
cristy7998e5f2009-10-08 02:45:33 +0000364 { "EPDF", UndefinedCompression, 0.0 },
365 { "EPI", UndefinedCompression, 0.0 },
366 { "EPS", UndefinedCompression, 0.0 },
367 { "EPS2", UndefinedCompression, 0.0 },
368 { "EPS3", UndefinedCompression, 0.0 },
369 { "EPSF", UndefinedCompression, 0.0 },
370 { "EPSI", UndefinedCompression, 0.0 },
371 { "EPT", UndefinedCompression, 0.0 },
372 { "PDF", UndefinedCompression, 0.0 },
373 { "PDF", ZipCompression, 0.0 },
374 { "PDF", FaxCompression, 0.0 },
375 { "PDF", JPEGCompression, 0.003 },
376 { "PDF", RLECompression, 0.0 },
377 { "PDF", LZWCompression, 0.0 },
378 { "PDFA", UndefinedCompression, 0.0 },
379 { "PS", UndefinedCompression, 0.0 },
380 { "PS2", UndefinedCompression, 0.0 },
381 { "PS3", UndefinedCompression, 0.0 },
382 { "PS3", ZipCompression, 0.0 },
383 { "PS3", FaxCompression, 0.0 },
384 { "PS3", JPEGCompression, 0.003 },
385 { "PS3", RLECompression, 0.0 },
386 { "PS3", LZWCompression, 0.0 },
cristy3ed852e2009-09-05 21:47:34 +0000387#endif
cristy7998e5f2009-10-08 02:45:33 +0000388 { (const char *) NULL, UndefinedCompression, 0.0 }
cristy3ed852e2009-09-05 21:47:34 +0000389 };
390
391static const char
392 *reference_map[] =
393 {
394 "bgro",
395 "bgrp",
396 "bgr",
397 "cmyk",
398 "cmy",
399 "i",
400 "prgb",
401 "rgba",
402 "rgbo",
403 "rgb",
404 (char *) NULL
405 };
406
407struct ReferenceStorage
408{
409 StorageType
410 type;
411
412 size_t
413 quantum;
414};
415
416static const struct ReferenceStorage
417 reference_storage[] =
418 {
419 { CharPixel, sizeof(unsigned char) },
420 { DoublePixel, sizeof(double) },
421 { FloatPixel, sizeof(float) },
cristy100b8d92012-01-08 00:32:49 +0000422 { LongPixel, sizeof(unsigned int) },
423 { LongLongPixel, sizeof(MagickSizeType) },
cristy3ed852e2009-09-05 21:47:34 +0000424 { ShortPixel, sizeof(unsigned short) },
425 { UndefinedPixel, 0 }
426 };
427
428struct ReferenceTypes
429{
430 ImageType
431 type;
432
cristybb503372010-05-27 20:51:26 +0000433 size_t
cristy3ed852e2009-09-05 21:47:34 +0000434 depth;
435};
436
437static const struct ReferenceTypes
438 reference_types[] =
439 {
440 { TrueColorType, 8 },
441 { TrueColorMatteType, 8 },
442 { GrayscaleType, 8 },
443 { GrayscaleMatteType, 8 },
444 { PaletteType, 8 },
445 { PaletteMatteType, 8 },
446 { PaletteBilevelMatteType, 8 },
447 { BilevelType, 1 },
448 { ColorSeparationType, 8 },
449 { ColorSeparationMatteType, 8 },
450 { TrueColorType, 10 },
451 { TrueColorType, 12 },
452 { TrueColorType, 16 },
cristy5f1c1ff2010-12-23 21:38:06 +0000453 { UndefinedType, 0 }
cristy3ed852e2009-09-05 21:47:34 +0000454 };
455
456#endif