-
ImageMagick version: libMagickCore-6.Q16.a libMagickWand-7.Q16.a The code bellow: wand = NewMagickWand();
if (!wand) {
return -ENOMEM;
}
unsigned char data = malloc(1024*3*1024);
memset(data, 0, 1024*3*1024);
status = MagickImportImagePixels(wand, 0, 0, 1024, 1024, "RGB", CharPixel, data);
if (status == 0) {
fprintf(stderr, "Error importing image pixels: %s\n", MagickGetException(wand, &status));
ExceptionType severity;
char *description;
description=MagickGetException(wand,&severity);
fprintf(stderr, "MagickImportImagePixels error %s %s %d %.1024s\n", GetMagickModule(), description);
DestroyMagickWand(wand);
return -EINVAL;
}
`
run this code i get error:
Error importing image pixels: wand contains no images `MagickWand-0' @ error/magick-image.c/MagickImportImagePixels/6715 |
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Mar 24, 2023
Replies: 1 comment
-
You will first need to add an image to the wand collection before you can import the pixels. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
T-bagwell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You will first need to add an image to the wand collection before you can import the pixels.