{ } Raw JSON

bundles / ipykernel 7.3.0 / ipykernel / jsonutil / encode_images

function

ipykernel.jsonutil:encode_images

source: /ipykernel/jsonutil.py:52

Signature

def encode_images(format_dict)

Summary

b64-encodes images in a displaypub format dict

Extended Summary

Perhaps this should be handled in json_clean itself?

Parameters

format_dict : dict

A dictionary of display data keyed by mime-type

Returns

format_dict : dict

A copy of the same dictionary, but binary image data ('image/png', 'image/jpeg' or 'application/pdf') is base64-encoded.

Aliases

  • ipykernel.jsonutil.encode_images