load image from file and display image
Posted: 2007-10-18T09:17:54-07:00
Hi. I have installed the ImageMagick-6.3.6-Q16.dll.
And i have create a new project to try using ImageMagick.
Here my code:
#include <Magick++.h>
using namespace Magick;
int main(int argc,char **argv)
{
InitializeMagick(*argv);
Image image("1.jpg");
image.display();
return 0;
}
Program crashed here: Image image("1.jpg");
Why it is happend?
And next problem. I draw my image and want to display it, but in console written this:
unable to open X server : No such file or directory.
How i can display my image?
And i have create a new project to try using ImageMagick.
Here my code:
#include <Magick++.h>
using namespace Magick;
int main(int argc,char **argv)
{
InitializeMagick(*argv);
Image image("1.jpg");
image.display();
return 0;
}
Program crashed here: Image image("1.jpg");
Why it is happend?
And next problem. I draw my image and want to display it, but in console written this:
unable to open X server : No such file or directory.
How i can display my image?