Hi,
I'm using the MagickWriteImage() method to create my own images. But I want to save them in a DataBase. That's why I'm trying but without success to find a way to catch the string used, i guess by a fwrite(), to create an image (without actually creates it). Is there a method to do this?
Thanks
Catch image's binaries
Re: Catch image's binaries
MagickGetImageBlob().
Re: Catch image's binaries
Hi,
Thank you for your quick response (unlike mine).
I'm trying to use this method, here is my approach:
wand = NewMagickWand();
MagickConstitueImage(wand, ...);
MagickSetImageFormat(wand, png) <---- I tried MagickSetFormat().
MagickSetDepth(...) <---- I tried without
MagickGetImageBlob(wand,&lengthBlob);
It only returns the header of my image "%PNG -->"
Replace MagickGetImageBlob() by MagickWriteImage(wand, outputpath) generates the image I expected.
What's the problem?
Thank you for your quick response (unlike mine).
I'm trying to use this method, here is my approach:
wand = NewMagickWand();
MagickConstitueImage(wand, ...);
MagickSetImageFormat(wand, png) <---- I tried MagickSetFormat().
MagickSetDepth(...) <---- I tried without
MagickGetImageBlob(wand,&lengthBlob);
It only returns the header of my image "%PNG -->"
Replace MagickGetImageBlob() by MagickWriteImage(wand, outputpath) generates the image I expected.
What's the problem?