mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
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:
commit
07bdb286a8
|
@ -1,10 +1,13 @@
|
|||
Writing your own file decoder
|
||||
=============================
|
||||
|
||||
The Python Imaging Library uses a plug-in model which allows you to add your
|
||||
own decoders to the library, without any changes to the library itself. Such
|
||||
plug-ins have names like :file:`XxxImagePlugin.py`, where ``Xxx`` is a unique
|
||||
format name (usually an abbreviation).
|
||||
The Python Imaging Library uses a plug-in model which allows you to
|
||||
add your own decoders to the library, without any changes to the
|
||||
library itself. Such plug-ins usually have names like
|
||||
: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
|
||||
:py:class:`PIL.ImageFile.ImageFile` base class. This class should provide an
|
||||
|
|
|
@ -15,3 +15,9 @@ to this::
|
|||
The :py:mod:`_imaging` module has been moved. You can now import it like this::
|
||||
|
||||
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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user