mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
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:
parent
53b7f6294b
commit
5857053be4
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -60,3 +60,9 @@ docs/_build/
|
||||||
\#*#
|
\#*#
|
||||||
.#*
|
.#*
|
||||||
|
|
||||||
|
#Komodo
|
||||||
|
*.komodoproject
|
||||||
|
|
||||||
|
#OS
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
|
|
@ -352,6 +352,10 @@ def preinit():
|
||||||
from PIL import JpegImagePlugin
|
from PIL import JpegImagePlugin
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
from PIL import MpoImagePlugin
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
from PIL import PpmImagePlugin
|
from PIL import PpmImagePlugin
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -554,7 +558,6 @@ class Image:
|
||||||
self.readonly = 0
|
self.readonly = 0
|
||||||
|
|
||||||
def _dump(self, file=None, format=None):
|
def _dump(self, file=None, format=None):
|
||||||
import os
|
|
||||||
import tempfile
|
import tempfile
|
||||||
suffix = ''
|
suffix = ''
|
||||||
if format:
|
if format:
|
||||||
|
@ -2228,6 +2231,7 @@ def open(fp, mode="r"):
|
||||||
|
|
||||||
for i in ID:
|
for i in ID:
|
||||||
try:
|
try:
|
||||||
|
print(ID)
|
||||||
factory, accept = OPEN[i]
|
factory, accept = OPEN[i]
|
||||||
if not accept or accept(prefix):
|
if not accept or accept(prefix):
|
||||||
fp.seek(0)
|
fp.seek(0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user