File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -28,3 +28,32 @@ After that, it's straightforward:
2828.. code-block :: console
2929
3030 $ pip install Pillow
31+
32+ Example
33+ ~~~~~~~
34+
35+ .. code-block :: python
36+
37+ from PIL import Image, ImageFilter
38+ # Read image
39+ im = Image.open( ' image.jpg' )
40+ # Display image
41+ im.show()
42+
43+ # Applying a filter to the image
44+ im_sharp = im.filter( ImageFilter.SHARPEN )
45+ # Saving the filtered image to a new file
46+ im_sharp.save( ' image_sharpened.jpg' , ' JPEG' )
47+
48+ # Splitting the image into its respective bands, i.e. Red, Green,
49+ # and Blue for RGB
50+ r,g,b = im_sharp.split()
51+
52+ # Viewing EXIF data embedded in image
53+ exif_data = im._getexif()
54+ exif_data
55+
56+ There are more examples of the Pillow library
57+ `here <http://pillow.readthedocs.org/en/3.0.x/handbook/tutorial.html >`_.
58+
59+
You can’t perform that action at this time.
0 commit comments