Merge pull request #409 from wiredfool/plugin_doc

Docs: Noted import change for Image Plugins. Fixes #404, plugin not foun...
This commit is contained in:
Alex Clark ☺ 2013-11-29 15:16:06 -08:00
commit 07bdb286a8
2 changed files with 13 additions and 4 deletions

View File

@ -1,10 +1,13 @@
Writing your own file decoder Writing your own file decoder
============================= =============================
The Python Imaging Library uses a plug-in model which allows you to add your The Python Imaging Library uses a plug-in model which allows you to
own decoders to the library, without any changes to the library itself. Such add your own decoders to the library, without any changes to the
plug-ins have names like :file:`XxxImagePlugin.py`, where ``Xxx`` is a unique library itself. Such plug-ins usually have names like
format name (usually an abbreviation). :file:`XxxImagePlugin.py`, where ``Xxx`` is a unique format name
(usually an abbreviation).
.. warning:: Pillow >= 2.1.0 no longer automatically imports any file in the Python path with a name ending in :file:`ImagePlugin.py`. You will need to import your decoder manually.
A decoder plug-in should contain a decoder class, based on the A decoder plug-in should contain a decoder class, based on the
:py:class:`PIL.ImageFile.ImageFile` base class. This class should provide an :py:class:`PIL.ImageFile.ImageFile` base class. This class should provide an

View File

@ -15,3 +15,9 @@ to this::
The :py:mod:`_imaging` module has been moved. You can now import it like this:: The :py:mod:`_imaging` module has been moved. You can now import it like this::
from PIL.Image import core as _imaging from PIL.Image import core as _imaging
The image plugin loading mechanisim has changed. Pillow no longer
automatically imports any file in the Python path with a name ending
in :file:`ImagePlugin.py`. You will need to import your image plugin
manually.