import numpy as np
from PIL import Image

image = Image.open("pics\\cactushigh.png")

# Konvertieren Sie das Bild in ein NumPy-Array
image_array = np.array(image)
strimg = str(image_array)

np.set_printoptions(threshold=np.inf)
print(strimg)

print(strimg.replace(" ", ", "))
# Speichern Sie das NumPy-Array in einer Textdatei
with open("output.txt", "w") as f:
    f.write(strimg.replace(" ", ", "))
    f.close()
