Skip to content

Commit

Permalink
Fix code example
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
  • Loading branch information
hugovk and radarhere committed Nov 11, 2021
1 parent 18d34b2 commit 81af72b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/releasenotes/9.0.0.rst
Expand Up @@ -79,10 +79,11 @@ TrueType fonts may now be pickled and unpickled. For example:

.. code-block:: python
from PIL import Image, ImageDraw, ImageFont
import pickle
from PIL import ImageFont
font = ImageFont.truetype("arial.ttf", size=30)
pickled_font = pickle.dumps(font1, protocol=pickle.HIGHEST_PROTOCOL)
pickled_font = pickle.dumps(font, protocol=pickle.HIGHEST_PROTOCOL)
# Later...
unpickled_font = pickle.loads(pickled_font)
Expand Down

0 comments on commit 81af72b

Please sign in to comment.