„scripts/bilder_verkleinern.py“ ändern
This commit is contained in:
@@ -81,4 +81,14 @@ def resize_images_recursive(root_path):
|
||||
print(f"Fehler bei {file_path}: {e}")
|
||||
|
||||
# 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)
|
||||
|
||||
Reference in New Issue
Block a user