Activated MPO detection.

Added MPO to the list to be checked. Removed the superfluous second os
import. Added OS X & Komodo work files to .gitignore.
This commit is contained in:
Eric W. Brown 2014-07-17 12:30:45 -04:00
parent 53b7f6294b
commit 5857053be4
2 changed files with 11 additions and 1 deletions

6
.gitignore vendored
View File

@ -60,3 +60,9 @@ docs/_build/
\#*#
.#*
#Komodo
*.komodoproject
#OS
.DS_Store

View File

@ -352,6 +352,10 @@ def preinit():
from PIL import JpegImagePlugin
except ImportError:
pass
try:
from PIL import MpoImagePlugin
except ImportError:
pass
try:
from PIL import PpmImagePlugin
except ImportError:
@ -554,7 +558,6 @@ class Image:
self.readonly = 0
def _dump(self, file=None, format=None):
import os
import tempfile
suffix = ''
if format:
@ -2228,6 +2231,7 @@ def open(fp, mode="r"):
for i in ID:
try:
print(ID)
factory, accept = OPEN[i]
if not accept or accept(prefix):
fp.seek(0)