title: OpenCV, python - namedWindow; WINDOW_KEEPRATIO; Linux vs Windows
body: <p>I'm working on a cross-platform system, and have noted that using opencv for showing of images is a bit different on Windows and Ubuntu/Linux.  I'm running these from the Anaconda distribution of Python 3.5, using Spyder as the IDE.</p>
  
  <p>OpenCV is version 3.1.0 on the Windows side.
  OpenCV is version 3.2.0 on the Linux side.</p>
  
  <p>Snippet of code is here:</p>
  
  <pre><code>window_name = 'image_A'
  cv2.namedWindow(window_name, cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO)
  cv2.imshow(window_name, named_image_a)
  cv2.resizeWindow(window_name, 480, 320)
  
  window_name = 'image_B'
  cv2.namedWindow(window_name, cv2.WINDOW_NORMAL | cv2.WINDOW_FREERATIO)
  cv2.imshow(window_name, named_image_b)
  cv2.resizeWindow(window_name, 480, 320)
  </code></pre>
  
  <p>On both the Linux and Windows side, both windows open to the same size and location - great.  </p>
  
  <p>However, regardless of the settings for the namedWindow on the Windows side, the images always are allowed to scale in FREERATIO mode, which isn't what I want or need.</p>
  
  <p>On the Linux side, the images always open in KEEPRATIO mode!</p>
  
  <p>Running both of these from an iPython console, with the graphics set the Qt5 backend.  According to:</p>
  
  <p><a href="https://fossies.org/dox/opencv-3.2.0/tutorial_display_image.html" rel="nofollow noreferrer">https://fossies.org/dox/opencv-3.2.0/tutorial_display_image.html</a></p>
  
  <p>...those tags only mean something when using the Qt5 option.</p>
  
  <p>What is wrong or off here?</p>
  
  <p>There's a tangential question why the same versions of OpenCV can't be installed on both; used</p>
  
  <p>conda install -c menpo opencv3</p>
  
  <p>for both, but this issue seems pretty basic, so version differences may not be the culprit.</p>
  
  <p>Looks like you can't install 3.2.0 from menpo, though:</p>
  
  <p>conda install -c menpo opencv3=3.2.0
  Fetching package metadata ...............</p>
  
  <p>PackageNotFoundError: Package missing in current win-64 channels:
    - opencv3 3.2.0*</p>