1
0
Fork 0
mirror of https://git.gay/Juli/error-codes.git synced 2025-04-15 01:48:39 +00:00
error-codes/gen_img.py
2024-10-09 22:00:06 +03:00

11 lines
No EOL
351 B
Python

import base64
with open('500.png', 'rb') as f:
image_data = f.read()
encoded_data = base64.b64encode(image_data).decode('utf-8')
print(f'<img src="data:image/png;base64,{encoded_data}" alt="image description">')
with open("output.html","w") as f:
f.write(f'<img id="foxo" alt="fox" title="fox" src="data:image/png;base64,{encoded_data}">')