Hi, import numpy as np import cv2 img=cv2.imread('4.jpg',0) cv2.imshow('image',img) k=cv2.waitKey(0) if k == 27: cv2.destroyAllWindows() #cv2.destroyWindow('image') elif k == ord('S'): cv2.imwrite('image.png',img) cv2.destroyAllWindows()
when I run this code,it is not possible to close the image window by pressing esc key,and if going to close by using mouse the window will hang. _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers