Hi,

recently I encountered problem with PIL on saving images which filename had no extension. When I tried to save such image, PIL raises KeyError

  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1423, in save
    raise KeyError(ext) # unknown extension

KeyError: ''


What is proper solution for such problem? I found out that I should specify format argument, so I wanted to use PIL's MIME dictionary, but I found out that it can not store multiple mime types for image format identifier, which is not very useful.

I would have to create mine dictionary that converts mime types to PIL formats, which I would like to avoid.

Any suggestions?

Vlastimil Zíma
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to