dahlia/wand — pull request #32 by wronglink (2012-08-09 19:28:05+00:00)
Title: Format forcing on new image creation

Sometimes imagemagick needs filename to detect file format. So when image is
created via blob or file arguments library raises an exeption. There is one
trick I've found [here](http://www.assembla.com/spaces/pythonmagickwand/wiki).
The idea is to set filename via MagickSetFilename magickwand method.

Here is a little example of my words:

>>> import requests
>>> from wand.image import Image
>>> r = requests.get('http://google.com/favicon.ico')
>>> img = Image(blob=r.content)
Traceback (most recent call last):
File "", line 1, in
File "wand/image.py", line 348, in __init__
self.raise_exception()
File "wand/resource.py", line 219, in raise_exception
raise e
MissingDelegateError: no decode delegate for this image format `' @ error/blob.c/BlobToImage/364
>>> img = Image(blob=r.content, format='ico')
>>> img.size
(16L, 16L)