Show More
@@ -98,6 +98,21 b' def encode_images(format_dict):' | |||
|
98 | 98 | """b64-encodes images in a displaypub format dict |
|
99 | 99 | |
|
100 | 100 | 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 | ||
|
101 | 116 | """ |
|
102 | 117 | encoded = format_dict.copy() |
|
103 | 118 | pngdata = format_dict.get('image/png') |
General Comments 0
You need to be logged in to leave comments.
Login now