I work with C API.
My code:
FILE *f = fopen("bomb.jpg", "rb");
size_t fsize = getfilesize(f);
void *content = malloc(fsize);
read(content, 1, fsize, f);
//I'm sure above is ok
MagicKWand *wand = NewMagickWand();
MagickSetFormat(wand, "jpg");
MagickSetFilename(wand, "jpg:out.jpg");
status = MagickReadImageBlob(wand, content, fsize);
status is MagickFalse
why ?please help me. My email: aireys@126.com
I have a problem with MagickReadImageBlob
Re: I have a problem with MagickReadImageBlob
I just want create a MagicKWand from a buffer
Re: I have a problem with MagickReadImageBlob
Use MagickGetException() to report why MagickReadImageBlob() failed. That will give you insight into why the read failed.