Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/scenarios/imaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>`_.