mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Updated syntax
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
parent
669512c2ac
commit
dd08584f7a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user