Updated syntax

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
Andrew Murray 2021-10-17 10:37:19 +11:00 committed by GitHub
parent 669512c2ac
commit dd08584f7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,12 +61,14 @@ Image Lifecycle
* ``Image.Image.close()`` Closes the file and destroys the core image object.
The Pillow context manager will also close the file, but will not destroy
the core image object. e.g.::
the core image object. e.g.:
with Image.open('test.jpg') as img:
.. code-block:: python
with Image.open("test.jpg") as img:
img.load()
assert img.fp is None
img.save('test.png')
img.save("test.png")
The lifecycle of a single-frame image is relatively simple. The file must