mirror of
https://git.gay/Juli/error-codes.git
synced 2025-04-15 01:48:39 +00:00
11 lines
No EOL
351 B
Python
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}">') |