I have a problem with MagickReadImageBlob
Posted: 2008-01-07T23:19:17-07:00
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
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