Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1from base64 import encode_bytes 

2from os import STDOUT 

3from os import Stdout 

4 

5func write(image: bytes): 

6 """Write given image to the terminal. 

7 

8 """ 

9 

10 STDOUT.write(f"\x1b]1337;File=size={image.length()};inline=1:".to_utf8()) 

11 STDOUT.write(encode_bytes(image)) 

12 STDOUT.write(b"\a")