Here is my situation I need to need to convert TIFF to PDF using a BLOB,
1. I read a document in TIFF from a TCP/IP connection. I have got this in to a "std::string" buffer named as "resp".
2. I have written this code to convert it to "PDF"
Code: Select all
using namespace Magick;
InitializeMagick(NULL);
Blob tiffBlob(static_cast<const void *>(resp.c_str()),resp.length());
Image image(tiffBlob);
Blob pdfBlob;
image.write(&pdfBlob,"PDF");
The C++ code dumps core at "image.write" line.
What am I doing wrong ? can some one please help?