These are chat archives for ipython/ipython

10th
Apr 2018
Min RK
@minrk
Apr 10 2018 08:14
@szhorvat ah, yes. You can do that. If you return a tuple of (pngbytes, {'width': 123, 'height': 456}) it will specify the display shape
You can see an example of a PNG renderer with IPython's builtin Image object:
from IPython.display import Image
im = Image(b'pngbytes', format='png', width=123, height=456)
im._repr_png_()