Your program is written like this:
cv2.imshow("BGR", imgname)
cv2.waitKey(0)
cv2.destroyAllWindows()
After running the program, the size cannot be adjusted. The improved program is written like this:
cv2.namedWindow('BGR', 0)
cv2.imshow("BGR", imgname)
cv2.waitKey(0)
cv2.destroyAllWindows()
Set the picture size, the improved program is written like this:
cv2.namedWindow('BGR', 0)
cv2.resizeWindow('BGR', X, Y)
cv2.imshow("BGR", imgname)
cv2.waitKey(0)
cv2.destroyAllWindows()