title: How do I set the window size of VideoCapture?
body: <p>In the following snippet of code how would I set the size of the capture window? I want to take a 256*256 pixel picture.</p>
  
  <pre><code>import numpy as np
  import cv2
  
  cap = cv2.VideoCapture(0)
  
  while(True):
    ret, frame = cap.read()
    cv2.imshow('img1',frame) 
    if cv2.waitKey(1) &amp; 0xFF == ord('y'): 
       cv2.imwrite('imag.png',frame)
       cv2.destroyAllWindows()
  cap.release()
  </code></pre>