MCPcopy Index your code
hub / github.com/ipython/ipython / _pngxy

Function _pngxy

IPython/core/display.py:801–805  ·  view source on GitHub ↗

read the (width, height) from a PNG header

(data)

Source from the content-addressed store, hash-verified

799
800
801def _pngxy(data):
802 """read the (width, height) from a PNG header"""
803 ihdr = data.index(b'IHDR')
804 # next 8 bytes are width/height
805 return struct.unpack('>ii', data[ihdr+4:ihdr+12])
806
807
808def _jpegxy(data):

Callers 2

retina_figureFunction · 0.90
_retina_shapeMethod · 0.85

Calls 1

indexMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…