1// This may look like C code, but it is really -*- C++ -*- 2// 3// Copyright Bob Friesenhahn, 1999, 2000, 2003 4// 5// Test STL coalesceImages function 6// 7 8#include <Magick++.h> 9#include <string> 10#include <iostream> 11#include <list> 12#include <vector> 13 14using namespace std; 15 16using namespace Magick; 17 18int main( int /*argc*/, char ** argv) 19{ 20 21 // Initialize ImageMagick install location for Windows 22 InitializeMagick(*argv); 23 24 int failures=0; 25 26 try { 27 28 string srcdir(""); 29 if(getenv("SRCDIR") != 0) 30 srcdir = getenv("SRCDIR"); 31 32 // 33 // Test coalesceImages 34 // 35 36 list<Image> imageList; 37 readImages( &imageList, srcdir + "test_image_anim.miff" ); 38 39 list<Image> coalescedList; 40 coalesceImages( &coalescedList, imageList.begin(), imageList.end() ); 41 } 42 43 catch( Exception &error_ ) 44 { 45 cout << "Caught exception: " << error_.what() << endl; 46 return 1; 47 } 48 catch( exception &error_ ) 49 { 50 cout << "Caught exception: " << error_.what() << endl; 51 return 1; 52 } 53 54 if ( failures ) 55 { 56 cout << failures << " failures" << endl; 57 return 1; 58 } 59 60 return 0; 61} 62 63