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