Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Making a window full screen keeping aspect ratio

I am trying to make a window full screen keeping its aspect ratio by the following code:

cvNamedWindow(win_title, CV_WINDOW_NORMAL); cvSetWindowProperty(win_title, CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN); cvSetWindowProperty(win_title, CV_WND_PROP_ASPECTRATIO, CV_WINDOW_KEEPRATIO);

but it does not keep the aspect ratio when it comes to full screen. Full-screen succeeded but keeping aspect ratio did not work. Any suggestions? (using opencv 2.4.2 windows binary distribution on Windows 7)

click to hide/show revision 2
No.2 Revision

Making a window full screen keeping aspect ratio

I am trying to make a window full screen keeping its aspect ratio by the following code:

 cvNamedWindow(win_title, CV_WINDOW_NORMAL);
  cvSetWindowProperty(win_title, CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN);
  cvSetWindowProperty(win_title, CV_WND_PROP_ASPECTRATIO, CV_WINDOW_KEEPRATIO);

CV_WINDOW_KEEPRATIO);

but it does not keep the aspect ratio when it comes to full screen. Full-screen succeeded but keeping aspect ratio did not work. Any suggestions? (using opencv 2.4.2 windows binary distribution on Windows 7)