why i got exception from averageImages ?
Posted: 2008-11-29T07:11:42-07:00
my code is like this:
terminate called after throwing an instance of 'Magick::ErrorOption'
what(): ImageMagick: image widths or heights differ `./01.gif' @ magick/image.c/AverageImages/802
*** Process aborted ***
Why ...what is a solution?
thanks..
Code: Select all
list<Image> imageList;
Image image01;
image01.read("./01.gif");
int imgWidth_ = image01.columns();
int imgHeight_ = image01.rows();
Geometry newSize(imgHeight_,imgWidth_);
//image01.scale(newSize);
imageList.push_back(image01);
Image image02;
image02.read("./02.gif");
image02.scale(newSize);
imageList.push_back(image02);
Image avi;//(newSize, Color(MaxRGB, MaxRGB, MaxRGB, 0));
averageImages(&avi,imageList.begin(),imageList.end());
avi.display();
what(): ImageMagick: image widths or heights differ `./01.gif' @ magick/image.c/AverageImages/802
*** Process aborted ***
Why ...what is a solution?
thanks..