Python Imaging Library/File IO

From Wikibooks, open books for an open world
Jump to: navigation, search

File operations in PIL are very simple, and reflect normal Python methods.

open[edit]

import Image
 
img = Image.open(filepath)

load[edit]

show[edit]

Displays a copy of the specified image in a window.

save[edit]