Page 1 of 1

Magick++ crashed on reading image

Posted: 2011-04-17T22:49:40-07:00
by ravisharma1987
Hello All,

There is a problem I am facing in using magick++,
When i am trying to read a jpg image, the programe is crashing.
I am using visual studio 2008, and here is my code snippet.
int main(int argc, char* argv[])
{
InitializeMagick("");
try {
// Image size
Image image;
cout<<"Reading an image"<<endl; ///////////I can see this print
image.read("C:\\cylinder_shaded.png"); ///////////Here is the crash happening
// Save to file
image.magick("png");
image.write("test.png");
}
catch( exception &e )
{
cout << "Caught exception: " << e.what() << endl;
}
return 0;
}