|
|
|
@ -81,4 +81,14 @@ def resize_images_recursive(root_path):
|
|
|
|
print(f"Fehler bei {file_path}: {e}")
|
|
|
|
print(f"Fehler bei {file_path}: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
# Starte die Suche im aktuellen Verzeichnis
|
|
|
|
# Starte die Suche im aktuellen Verzeichnis
|
|
|
|
resize_images_recursive('.')
|
|
|
|
resize_images_recursive('.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import base64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Bild im Binärmodus (rb) öffnen
|
|
|
|
|
|
|
|
with open("bild.png", "rb") as image_file:
|
|
|
|
|
|
|
|
# Den Inhalt lesen und kodieren
|
|
|
|
|
|
|
|
encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(encoded_string)
|
|
|
|
|