I'm using MagickCore to generate images from scratch. I'm trying to save my Image
as a PNG file, but whenever I call WriteImage
, it outputs to standard out rather than to the filename that I specified. For example:
Image *image = ImageGenerator(...); // generates valid image
ImageInfo *info = CloneImageInfo (NULL);
info->file = NULL;
strcpy (info->filename, "test.png");
strcpy (info->magick, "png");
WriteImage (info, image);
When this code is used, it outputs PNG data to standard out rather than to test.png
. Is there something else that I am missing?