mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Docs: Noted import change for Image Plugins. Fixes #404, plugin not found
This commit is contained in:
		
							parent
							
								
									b4cf30f7fa
								
							
						
					
					
						commit
						16dac77847
					
				|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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. | ||||||
|  | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user