2 Copyright 1999-2011 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 1 -verbose",
210 "-geometry 13x19+10+5 -gravity Center",
225 struct ReferenceFormats
237 static const struct ReferenceFormats
238 reference_formats[] =
240 { "ART", UndefinedCompression, 0.0 },
241 { "AVS", UndefinedCompression, 0.0 },
242 { "BMP", UndefinedCompression, 0.0 },
243 { "CIN", UndefinedCompression, 0.0 },
244 { "CMYK", UndefinedCompression, 0.0 },
245 { "CMYKA", UndefinedCompression, 0.0 },
246 { "CUT", UndefinedCompression, 0.0 },
247 { "DCM", UndefinedCompression, 0.0 },
248 { "DCR", UndefinedCompression, 0.0 },
249 { "DCX", UndefinedCompression, 0.0 },
250 { "DDS", UndefinedCompression, 0.0 },
251 { "DFONT", UndefinedCompression, 0.0 },
252 { "DJVU", UndefinedCompression, 0.0 },
253 { "DNG", UndefinedCompression, 0.0 },
254 { "DOT", UndefinedCompression, 0.0 },
255 { "DPS", UndefinedCompression, 0.0 },
256 { "DPX", UndefinedCompression, 0.003 },
257 { "ERF", UndefinedCompression, 0.0 },
258 { "EXR", UndefinedCompression, 0.0 },
259 { "FITS", UndefinedCompression, 0.003 },
260 { "FPX", UndefinedCompression, 0.0 },
261 { "FRACTAL", UndefinedCompression, 0.0 },
262 { "FTS", UndefinedCompression, 0.003 },
263 { "GIF", UndefinedCompression, 0.0 },
264 { "GIF87", UndefinedCompression, 0.0 },
265 { "GRAY", UndefinedCompression, 0.0 },
266 { "HTM", UndefinedCompression, 0.0 },
267 { "HRZ", UndefinedCompression, 0.0 },
268 { "HTML", UndefinedCompression, 0.0 },
269 { "ICB", UndefinedCompression, 0.0 },
270 { "ICO", UndefinedCompression, 0.0 },
271 { "ICON", UndefinedCompression, 0.0 },
272 { "INFO", UndefinedCompression, 0.0 },
273 { "INLINE", UndefinedCompression, 0.0 },
274 { "JBG", UndefinedCompression, 0.0 },
275 { "JNG", UndefinedCompression, 0.003 },
276 { "JP2", UndefinedCompression, 0.0 },
277 { "JPC", UndefinedCompression, 0.0 },
278 { "JPEG", UndefinedCompression, 0.003 },
279 { "JPG", UndefinedCompression, 0.003 },
280 { "K25", UndefinedCompression, 0.0 },
281 { "KDC", UndefinedCompression, 0.0 },
282 { "MATTE", UndefinedCompression, 0.0 },
283 { "MIFF", UndefinedCompression, 0.0 },
284 { "MNG", UndefinedCompression, 0.0 },
285 { "MONO", UndefinedCompression, 0.0 },
286 { "MRW", UndefinedCompression, 0.0 },
287 { "MTV", UndefinedCompression, 0.0 },
288 { "NEF", UndefinedCompression, 0.0 },
289 { "ORF", UndefinedCompression, 0.0 },
290 { "OTB", UndefinedCompression, 0.0 },
291 { "OTF", UndefinedCompression, 0.0 },
292 { "PAL", UndefinedCompression, 0.0 },
293 { "PAM", UndefinedCompression, 0.0 },
294 { "PBM", UndefinedCompression, 0.0 },
295 { "PCT", UndefinedCompression, 0.003 },
296 { "PCX", UndefinedCompression, 0.0 },
297 { "PEF", UndefinedCompression, 0.0 },
298 { "PFA", UndefinedCompression, 0.0 },
299 { "PFB", UndefinedCompression, 0.0 },
300 { "PFM", UndefinedCompression, 0.0 },
301 { "PGM", UndefinedCompression, 0.0 },
302 { "PGX", UndefinedCompression, 0.0 },
303 { "PICT", UndefinedCompression, 0.003 },
304 { "PIX", UndefinedCompression, 0.0 },
305 { "PJPEG", UndefinedCompression, 0.003 },
306 { "PLASMA", UndefinedCompression, 0.0 },
307 { "PNG", UndefinedCompression, 0.0 },
308 { "PNG24", UndefinedCompression, 0.0 },
309 { "PNG32", UndefinedCompression, 0.0 },
310 { "PNM", UndefinedCompression, 0.0 },
311 { "PPM", UndefinedCompression, 0.0 },
312 { "PREVIEW", UndefinedCompression, 0.0 },
313 { "PTIF", UndefinedCompression, 0.0 },
314 { "PWP", UndefinedCompression, 0.0 },
315 { "RADIAL-GR", UndefinedCompression, 0.0 },
316 { "RAF", UndefinedCompression, 0.0 },
317 { "RAS", UndefinedCompression, 0.0 },
318 { "RGB", UndefinedCompression, 0.0 },
319 { "RGBA", UndefinedCompression, 0.003 },
320 { "RGBO", UndefinedCompression, 0.003 },
321 { "RLA", UndefinedCompression, 0.0 },
322 { "RLE", UndefinedCompression, 0.0 },
323 { "SCR", UndefinedCompression, 0.0 },
324 { "SCT", UndefinedCompression, 0.0 },
325 { "SFW", UndefinedCompression, 0.0 },
326 { "SGI", UndefinedCompression, 0.0 },
327 { "SHTML", UndefinedCompression, 0.0 },
328 { "SR2", UndefinedCompression, 0.0 },
329 { "SRF", UndefinedCompression, 0.0 },
330 { "STEGANO", UndefinedCompression, 0.0 },
331 { "SUN", UndefinedCompression, 0.0 },
332 { "TGA", UndefinedCompression, 0.0 },
333 { "TIFF", UndefinedCompression, 0.0 },
334 { "TIFF64", UndefinedCompression, 0.0 },
335 { "TILE", UndefinedCompression, 0.0 },
336 { "TIM", UndefinedCompression, 0.0 },
337 { "TTC", UndefinedCompression, 0.0 },
338 { "TTF", UndefinedCompression, 0.0 },
339 { "TXT", UndefinedCompression, 0.0 },
340 { "UIL", UndefinedCompression, 0.0 },
341 { "UYVY", UndefinedCompression, 0.0 },
342 { "VDA", UndefinedCompression, 0.0 },
343 { "VICAR", UndefinedCompression, 0.0 },
344 { "VIFF", UndefinedCompression, 0.0 },
345 { "VST", UndefinedCompression, 0.0 },
346 { "WBMP", UndefinedCompression, 0.0 },
347 { "WPG", UndefinedCompression, 0.0 },
348 { "X3F", UndefinedCompression, 0.0 },
349 { "XBM", UndefinedCompression, 0.0 },
350 { "XCF", UndefinedCompression, 0.0 },
351 { "XPM", UndefinedCompression, 0.0 },
352 { "XPS", UndefinedCompression, 0.0 },
353 { "XV", UndefinedCompression, 0.0 },
354 #if !defined(MAGICKCORE_WINDOWS_SUPPORT)
355 { "XWD", UndefinedCompression, 0.0 },
357 { "YUV", UndefinedCompression, 0.0 },
358 { "YCbCr", UndefinedCompression, 0.0 },
359 { "YCbCrA", UndefinedCompression, 0.0 },
360 #if defined(MAGICKCORE_GS_DELEGATE)
361 { "AI", UndefinedCompression, 0.0 },
362 { "EPDF", UndefinedCompression, 0.0 },
363 { "EPI", UndefinedCompression, 0.0 },
364 { "EPS", UndefinedCompression, 0.0 },
365 { "EPS2", UndefinedCompression, 0.0 },
366 { "EPS3", UndefinedCompression, 0.0 },
367 { "EPSF", UndefinedCompression, 0.0 },
368 { "EPSI", UndefinedCompression, 0.0 },
369 { "EPT", UndefinedCompression, 0.0 },
370 { "PDF", UndefinedCompression, 0.0 },
371 { "PDF", ZipCompression, 0.0 },
372 { "PDF", FaxCompression, 0.0 },
373 { "PDF", JPEGCompression, 0.003 },
374 { "PDF", RLECompression, 0.0 },
375 { "PDF", LZWCompression, 0.0 },
376 { "PDFA", UndefinedCompression, 0.0 },
377 { "PS", UndefinedCompression, 0.0 },
378 { "PS2", UndefinedCompression, 0.0 },
379 { "PS3", UndefinedCompression, 0.0 },
380 { "PS3", ZipCompression, 0.0 },
381 { "PS3", FaxCompression, 0.0 },
382 { "PS3", JPEGCompression, 0.003 },
383 { "PS3", RLECompression, 0.0 },
384 { "PS3", LZWCompression, 0.0 },
386 { (const char *) NULL, UndefinedCompression, 0.0 }
405 struct ReferenceStorage
414 static const struct ReferenceStorage
415 reference_storage[] =
417 { CharPixel, sizeof(unsigned char) },
418 { DoublePixel, sizeof(double) },
419 { FloatPixel, sizeof(float) },
420 { IntegerPixel, sizeof(unsigned int) },
421 { LongPixel, sizeof(size_t) },
422 { ShortPixel, sizeof(unsigned short) },
423 { UndefinedPixel, 0 }
426 struct ReferenceTypes
435 static const struct ReferenceTypes
438 { TrueColorType, 8 },
439 { TrueColorMatteType, 8 },
440 { GrayscaleType, 8 },
441 { GrayscaleMatteType, 8 },
443 { PaletteMatteType, 8 },
444 { PaletteBilevelMatteType, 8 },
446 { ColorSeparationType, 8 },
447 { ColorSeparationMatteType, 8 },
448 { TrueColorType, 10 },
449 { TrueColorType, 12 },
450 { TrueColorType, 16 },