Create Image from blob

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
terris

Create Image from blob

Post by terris »

Hi,

I'm using MagickCore but I don't see a forum for it.

I'm loading a jpg file from a URL and trying to create an Image object from it.

char s[1024];
// load exactly 1024 bytes (magically that's the exact size of the blob for this example)

Magick::Blob b(s, 1024);
Magick::Image(b);

This code is blowing up with a ErrorModule exception but what() is blank. Any ideas what might be wrong?


Thanks,
Terris
terris

Re: Create Image from blob

Post by terris »

After building the source (thanks for the nice tool for Windows!) this code ran fine.

Great project. Glad I found you all.
Post Reply