1 // This may look like C code, but it is really -*- C++ -*-
3 // Copyright Bob Friesenhahn, 1999, 2000, 2003
5 // Test STL averageImages function
16 using namespace Magick;
18 int main( int /*argc*/, char ** argv)
21 // Initialize ImageMagick install location for Windows
22 InitializeMagick(*argv);
29 if(getenv("SRCDIR") != 0)
30 srcdir = getenv("SRCDIR");
36 list<Image> imageList;
37 readImages( &imageList, srcdir + "test_image_anim.miff" );
40 averageImages( &averaged, imageList.begin(), imageList.end() );
41 // averaged.display();
42 if ( 0 && averaged.signature() != "d4b4ffb8b70c4e9b0e50445542deb26fbcdf8c393c793123cbc92fb35341e44d" &&
43 averaged.signature() != "62d46d6d239b9fbd3b8ff2271aed1b5dde6303e0d5228dd8d833f61a7b012a79" &&
44 averaged.signature() != "fdc76a2689d19061e1f7f6adfd79a2c04bc4608125a2cd2a1bce0d981774e13f" &&
45 averaged.signature() != "66dfb88c21405a6bf582c9a542d87fd14db176aae1f34bc30b0b3e2443b49aa8" &&
46 averaged.signature() != "f3bc318abc0b842c656b6545d1d7159eedb61f559a95fc5df671db7d0c0639de")
48 cout << "Line: " << __LINE__
49 << " Averaging image failed, signature = "
50 << averaged.signature() << endl;
56 catch( Exception &error_ )
58 cout << "Caught exception: " << error_.what() << endl;
61 catch( exception &error_ )
63 cout << "Caught exception: " << error_.what() << endl;
69 cout << failures << " failures" << endl;