2 Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 http://www.imagemagick.org/script/license.php
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.
16 ImageMagick test vectors.
18 #ifndef _IMAGEMAGICK_VALIDATE_H
19 #define _IMAGEMAGICK_VALIDATE_H
21 #define ReferenceFilename "rose:"
22 #define ReferenceImageFormat "MIFF"
29 "-highlight-color SeaGreen",
30 "-metric AE -fuzz 5%",
35 *composite_options[] =
42 "-compose ChangeMask",
45 "-compose ColorDodge",
52 "-compose CopyMagenta",
53 "-compose CopyOpacity",
55 "-compose CopyYellow",
59 "-compose Difference",
72 "-compose LinearLight",
95 "-geometry +35+65 -label Magick",
103 "-affine 1,0,0.785,1,0,0 -transform",
104 "-black-threshold 20%",
120 "-convolve 1,1,1,1,4,1,1,1,1",
121 "-colorize 30%/20%/50%",
125 "-draw \"rectangle 20,10 80,50\"",
133 "-fx \"(1.0/(1.0+exp(10.0*(0.5-u)))-0.006693)*1.0092503\"",
140 "-level 10%,1.2,90%",
143 "-modulate 110/100/95",
145 "-motion-blur 0x3+30",
149 "+noise Multiplicative",
155 "-fill blue -fuzz 35% -opaque red",
156 "-ordered-dither 2x2",
159 "-random-threshold 10%",
160 "-recolor '0.9 0 0, 0 0.9 0, 0 0 1.2'",
161 "-density 75x75 -resample 50x50",
187 "-fuzz 35% -transparent red",
189 "-unsharp 0x1.0+20+1",
191 "-white-threshold 80%",
196 *identify_options[] =
200 "-features -verbose",
209 "-geometry 13x19+10+5 -gravity Center",
224 struct ReferenceFormats
236 static const struct ReferenceFormats
237 reference_formats[] =
239 { "ART", UndefinedCompression, 0.0 },
240 { "AVS", UndefinedCompression, 0.0 },
241 { "BMP", UndefinedCompression, 0.0 },
242 { "CIN", UndefinedCompression, 0.0 },
243 { "CMYK", UndefinedCompression, 0.0 },
244 { "CMYKA", UndefinedCompression, 0.0 },
245 { "CUT", UndefinedCompression, 0.0 },
246 { "DCM", UndefinedCompression, 0.0 },
247 { "DCR", UndefinedCompression, 0.0 },
248 { "DCX", UndefinedCompression, 0.0 },
249 { "DDS", UndefinedCompression, 0.0 },
250 { "DFONT", UndefinedCompression, 0.0 },
251 { "DJVU", UndefinedCompression, 0.0 },
252 { "DNG", UndefinedCompression, 0.0 },
253 { "DOT", UndefinedCompression, 0.0 },
254 { "DPS", UndefinedCompression, 0.0 },
255 { "DPX", UndefinedCompression, 0.0 },
256 { "ERF", UndefinedCompression, 0.0 },
257 { "EXR", UndefinedCompression, 0.0 },
258 { "FITS", UndefinedCompression, 0.003 },
259 { "FPX", UndefinedCompression, 0.0 },
260 { "FRACTAL", UndefinedCompression, 0.0 },
261 { "FTS", UndefinedCompression, 0.003 },
262 { "GIF", UndefinedCompression, 0.0 },
263 { "GIF87", UndefinedCompression, 0.0 },
264 { "GRAY", UndefinedCompression, 0.0 },
265 { "HTM", UndefinedCompression, 0.0 },
266 { "HRZ", UndefinedCompression, 0.0 },
267 { "HTML", UndefinedCompression, 0.0 },
268 { "ICB", UndefinedCompression, 0.0 },
269 { "ICO", UndefinedCompression, 0.0 },
270 { "ICON", UndefinedCompression, 0.0 },
271 { "INFO", UndefinedCompression, 0.0 },
272 { "INLINE", UndefinedCompression, 0.0 },
273 { "JBG", UndefinedCompression, 0.0 },
274 { "JNG", UndefinedCompression, 0.003 },
275 { "JP2", UndefinedCompression, 0.0 },
276 { "JPC", UndefinedCompression, 0.0 },
277 { "JPEG", UndefinedCompression, 0.003 },
278 { "JPG", UndefinedCompression, 0.003 },
279 { "K25", UndefinedCompression, 0.0 },
280 { "KDC", UndefinedCompression, 0.0 },
281 { "MAT", UndefinedCompression, 0.0 },
282 { "MATTE", UndefinedCompression, 0.0 },
283 { "MIFF", UndefinedCompression, 0.0 },
284 { "MNG", UndefinedCompression, 0.0 },
285 { "MONO", UndefinedCompression, 0.0 },
286 { "MOV", UndefinedCompression, 0.0 },
287 { "MRW", UndefinedCompression, 0.0 },
288 { "MTV", UndefinedCompression, 0.0 },
289 { "NEF", UndefinedCompression, 0.0 },
290 { "ORF", UndefinedCompression, 0.0 },
291 { "OTB", UndefinedCompression, 0.0 },
292 { "OTF", UndefinedCompression, 0.0 },
293 { "PAL", UndefinedCompression, 0.0 },
294 { "PAM", UndefinedCompression, 0.0 },
295 { "PBM", UndefinedCompression, 0.0 },
296 { "PCT", UndefinedCompression, 0.003 },
297 { "PCX", UndefinedCompression, 0.0 },
298 { "PEF", UndefinedCompression, 0.0 },
299 { "PFA", UndefinedCompression, 0.0 },
300 { "PFB", UndefinedCompression, 0.0 },
301 { "PFM", UndefinedCompression, 0.0 },
302 { "PGM", UndefinedCompression, 0.0 },
303 { "PGX", UndefinedCompression, 0.0 },
304 { "PICT", UndefinedCompression, 0.003 },
305 { "PIX", UndefinedCompression, 0.0 },
306 { "PJPEG", UndefinedCompression, 0.003 },
307 { "PLASMA", UndefinedCompression, 0.0 },
308 { "PNG", UndefinedCompression, 0.0 },
309 { "PNG24", UndefinedCompression, 0.0 },
310 { "PNG32", UndefinedCompression, 0.0 },
311 { "PNM", UndefinedCompression, 0.0 },
312 { "PPM", UndefinedCompression, 0.0 },
313 { "PREVIEW", UndefinedCompression, 0.0 },
314 { "PTIF", UndefinedCompression, 0.0 },
315 { "PWP", UndefinedCompression, 0.0 },
316 { "RADIAL-GR", UndefinedCompression, 0.0 },
317 { "RAF", UndefinedCompression, 0.0 },
318 { "RAS", UndefinedCompression, 0.0 },
319 { "RGB", UndefinedCompression, 0.0 },
320 { "RGBA", UndefinedCompression, 0.003 },
321 { "RGBO", UndefinedCompression, 0.0 },
322 { "RLA", UndefinedCompression, 0.0 },
323 { "RLE", UndefinedCompression, 0.0 },
324 { "SCR", UndefinedCompression, 0.0 },
325 { "SCT", UndefinedCompression, 0.0 },
326 { "SFW", UndefinedCompression, 0.0 },
327 { "SGI", UndefinedCompression, 0.0 },
328 { "SHTML", UndefinedCompression, 0.0 },
329 { "SR2", UndefinedCompression, 0.0 },
330 { "SRF", UndefinedCompression, 0.0 },
331 { "STEGANO", UndefinedCompression, 0.0 },
332 { "SUN", UndefinedCompression, 0.0 },
333 { "TGA", UndefinedCompression, 0.0 },
334 { "TIFF", UndefinedCompression, 0.0 },
335 { "TIFF64", UndefinedCompression, 0.0 },
336 { "TILE", UndefinedCompression, 0.0 },
337 { "TIM", UndefinedCompression, 0.0 },
338 { "TTC", UndefinedCompression, 0.0 },
339 { "TTF", UndefinedCompression, 0.0 },
340 { "TXT", UndefinedCompression, 0.0 },
341 { "UIL", UndefinedCompression, 0.0 },
342 { "UYVY", UndefinedCompression, 0.0 },
343 { "VDA", UndefinedCompression, 0.0 },
344 { "VICAR", UndefinedCompression, 0.0 },
345 { "VIFF", UndefinedCompression, 0.0 },
346 { "VST", UndefinedCompression, 0.0 },
347 { "WBMP", UndefinedCompression, 0.0 },
348 { "WPG", UndefinedCompression, 0.0 },
349 { "X3F", UndefinedCompression, 0.0 },
350 { "XBM", UndefinedCompression, 0.0 },
351 { "XCF", UndefinedCompression, 0.0 },
352 { "XPM", UndefinedCompression, 0.0 },
353 { "XPS", UndefinedCompression, 0.0 },
354 { "XV", UndefinedCompression, 0.0 },
355 #if !defined(__WINDOWS__)
356 { "XWD", UndefinedCompression, 0.0 },
358 { "YUV", UndefinedCompression, 0.0 },
359 { "YCbCr", UndefinedCompression, 0.0 },
360 { "YCbCrA", UndefinedCompression, 0.0 },
361 #if defined(MAGICKCORE_GS_DELEGATE)
362 { "AI", UndefinedCompression, 0.0 },
363 { "EPDF", UndefinedCompression, 0.0 },
364 { "EPI", UndefinedCompression, 0.0 },
365 { "EPS", UndefinedCompression, 0.0 },
366 { "EPS2", UndefinedCompression, 0.0 },
367 { "EPS3", UndefinedCompression, 0.0 },
368 { "EPSF", UndefinedCompression, 0.0 },
369 { "EPSI", UndefinedCompression, 0.0 },
370 { "EPT", UndefinedCompression, 0.0 },
371 { "PDF", UndefinedCompression, 0.0 },
372 { "PDF", ZipCompression, 0.0 },
373 { "PDF", FaxCompression, 0.0 },
374 { "PDF", JPEGCompression, 0.003 },
375 { "PDF", RLECompression, 0.0 },
376 { "PDF", LZWCompression, 0.0 },
377 { "PDFA", UndefinedCompression, 0.0 },
378 { "PS", UndefinedCompression, 0.0 },
379 { "PS2", UndefinedCompression, 0.0 },
380 { "PS3", UndefinedCompression, 0.0 },
381 { "PS3", ZipCompression, 0.0 },
382 { "PS3", FaxCompression, 0.0 },
383 { "PS3", JPEGCompression, 0.003 },
384 { "PS3", RLECompression, 0.0 },
385 { "PS3", LZWCompression, 0.0 },
387 { (const char *) NULL, UndefinedCompression, 0.0 }
406 struct ReferenceStorage
415 static const struct ReferenceStorage
416 reference_storage[] =
418 { CharPixel, sizeof(unsigned char) },
419 { DoublePixel, sizeof(double) },
420 { FloatPixel, sizeof(float) },
421 { IntegerPixel, sizeof(unsigned int) },
422 { LongPixel, sizeof(unsigned long) },
423 { ShortPixel, sizeof(unsigned short) },
424 { UndefinedPixel, 0 }
427 struct ReferenceTypes
436 static const struct ReferenceTypes
439 { TrueColorType, 8 },
440 { TrueColorMatteType, 8 },
441 { GrayscaleType, 8 },
442 { GrayscaleMatteType, 8 },
444 { PaletteMatteType, 8 },
445 { PaletteBilevelMatteType, 8 },
447 { ColorSeparationType, 8 },
448 { ColorSeparationMatteType, 8 },
449 { TrueColorType, 10 },
450 { TrueColorType, 12 },
451 { TrueColorType, 16 },