安装

以Archlinux环境为例

$ sudo pacman -S libmagick

测试

参考 Magick++

代码 test.cpp

#include <Magick++.h>
#include <string>
#include <iostream>
#include <list>

using namespace std;
using namespace Magick;

int main( int /*argc*/, char ** argv)
{

 Image image(argv[1]);
 image.write(argv[2]);

 return 0;
}

编译

$ c++ `Magick++-config --cxxflags --cppflags --ldflags --libs` test.cpp -o test

运行

$ ./test src.tiff dst.jpg


Published

02 February 2018

Tags


Share On