\> ImageToFile: Assertion `image->blob->type != UndefinedStream' failed Which version of ImageMagick are you using? Can you post a code snippet so we can reproduce the problem? It looks like ImageMagick is checking that the blob is not closed and it is and it is unexpected.