Last modified on 19 February 2015, at 21:32

Python Imaging Library/File IO

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

openEdit

import Image
 
img = Image.open(filepath)

loadEdit

showEdit

Displays a copy of the specified image in a window.

saveEdit

import Image
 
img = Image.open(filepath)
img.save("example.png")
 
#img.save(outfile, options...)
#img.save(outfile, format, options...)