qnikst/imagemagick — pull request #25 by timmytofu (2013-12-08 09:19:46+00:00)
Title: Provide access to MagickGetImagesBlob to get a whole sequence as a blob (e.g. for animated GIFs)

I just copied `getImageBlob`, really, not sure what else to add.

This is useful for me processing animated GIFs but not wanting to write them to a file. A façade for `MagickWriteImages` was provided - any reason to not have `MagickGetImagesBlob`? The possibility of dumping a very large image into a BS?

I wasn't sure how to test this, either, so I just used the `test_getReadImageBlob` size test logic on a proper animated GIF and a JPG. I was thinking it would be possible to compare the size of the imagesBlob BS to the sum of individual blobs, but I'm not sure the relationship of the extra overhead of each frame being realized as an independent GIF versus the animated sequence (with metadata indicating delay, etc). Also, the only way I found to get such a sum was ugly (making a version of `getImageBlob` that doesn't reset the iterator to the beginning and doing a kind of loop), and didn't see any test I could pinch from the python wand library mentioned in `ImageTest.hs`. Open to suggestions.