Magick++ with MSYS2
Posted: 2017-07-14T16:05:19-07:00
Hi,
I have a really special question but maybe someone can help:
I am trying to use Magick++ with MSYS2 http://www.msys2.org/. "MSYS2 is a software distro and building platform for Windows"
I use the Qt Creator with Qt5 and mingw 64 bit.
I ran into a problem:
When I compile my simple code, I get no error message, but when I run my programm I get the error message that the delegates are missing. Or it cannot find the color.xml.
Do I miss an include e.g.? It seems to me that all the dlls and config files (color.xml) are not found by magick++. But within MSYS2 threre is a compiled and working exe for magick.exe or convert.exe.
I have a really special question but maybe someone can help:
I am trying to use Magick++ with MSYS2 http://www.msys2.org/. "MSYS2 is a software distro and building platform for Windows"
I use the Qt Creator with Qt5 and mingw 64 bit.
I ran into a problem:
When I compile my simple code, I get no error message, but when I run my programm I get the error message that the delegates are missing. Or it cannot find the color.xml.
Do I miss an include e.g.? It seems to me that all the dlls and config files (color.xml) are not found by magick++. But within MSYS2 threre is a compiled and working exe for magick.exe or convert.exe.
Code: Select all
#include <QCoreApplication>
#include <ImageMagick-7/Magick++.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Magick::InitializeMagick(*argv);
Magick::Image image;
try
{
image.read( "untitled.png" );
image.write( "x.jpg" );
Magick::Image image2( "100x100", "white" );
image2.pixelColor( 49, 49, "red" );
image2.write( "red_pixel.png" );
}
catch( Magick::Exception &error_ )
{
cout << "Caught exception: " << error_.what() << endl;
}
return a.exec();
}