I decided to make a slideshow of photos, and I want the last photo to remain on the screen after the cycle, and the window will not close.
import cv2
# Список путей к изображениям
images = ['1.png', '2.png', '3.png']
for image_path in images:
img = cv2.imread(image_path)
cv2.imshow('Image', img)
cv2.waitKey(1000) # Ожидание 1 секунды
cv2.destroyAllWindows() # Закрытие последнего окна
I tried to comment out the last line, because I thought that it affects this