Added in examples and link to tutorial for imaging.rst.

This commit is contained in:
Gordon Senesac Jr
2015-10-12 20:53:52 -05:00
parent 69cd9aa270
commit 2b12a3c99d
+29
View File
@@ -28,3 +28,32 @@ After that, it's straightforward:
.. code-block:: console
$ pip install Pillow
Example
~~~~~~~
.. code-block:: python
from PIL import Image, ImageFilter
#Read image
im = Image.open( 'image.jpg' )
#Display image
im.show()
#Applying a filter to the image
im_sharp = im.filter( ImageFilter.SHARPEN )
#Saving the filtered image to a new file
im_sharp.save( 'image_sharpened.jpg', 'JPEG' )
#Splitting the image into its respective bands, i.e. Red, Green,
#and Blue for RGB
r,g,b = im_sharp.split()
#Viewing EXIF data embedded in image
exif_data = im._getexif()
exif_data
There are more examples of the Pillow library
`here <http://pillow.readthedocs.org/en/3.0.x/handbook/tutorial.html>`_.