read the (width, height) from a PNG header
(data)
| 799 | |
| 800 | |
| 801 | def _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 | |
| 808 | def _jpegxy(data): |
no test coverage detected
searching dependent graphs…