Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5d4a12

Browse files
committed
expand encode_images docstring
1 parent 0014248 commit b5d4a12

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

IPython/utils/jsonutil.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ def encode_images(format_dict):
9898
"""b64-encodes images in a displaypub format dict
9999
100100
Perhaps this should be handled in json_clean itself?
101+
102+
Parameters
103+
----------
104+
105+
format_dict : dict
106+
A dictionary of display data keyed by mime-type
107+
108+
Returns
109+
-------
110+
111+
format_dict : dict
112+
A copy of the same dictionary,
113+
but binary image data ('image/png' or 'image/jpeg')
114+
is base64-encoded.
115+
101116
"""
102117
encoded = format_dict.copy()
103118
pngdata = format_dict.get('image/png')

0 commit comments

Comments
 (0)