title: How to refresh the image content in a window?
body: <pre><code>cv2.namedWindow("image",0)
  img=cv2.imread("autojump.png")
  while 1:
      img=cv2.imread("autojump.png")
      cv2.imshow("image",img)
      k=cv2.waitKey(0) &amp; 0XFF
      if k== 27 :
          break
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>The image file <code>autojump.png</code>'s content will change along with time(rewritten by </p>
  
  <p><code>with open("autojump.png","w") as f : 
  f.write(some_other_image_bytes_stream)</code>
  ), so I reload it during the while loop, but it seems that the window never refresh.Just always the same image. What's wrong?</p>