I'm trying to convert a multi page tiff file to pdf using Magick++. I'm using the following code:
Code: Select all
#include <Magick++.h>
int main(int argc, char **argv)
{
Magick::InitializeMagick(argv[0]);
Magick::Image img;
img.read(argv[0]);
string imageSpec = "PDF:";
imageSpec += argv[1];
img.write(imageSpec);
return 0;
}
The same file is correctly converted if i use the convert tool (i.e. convert.exe input.tif output.pdf)
Since convert tool works well, i suppose my problem lies in Magick++
I'm using ImageMagick-6.8.4-9 in Windows