Skip to content

Commit 6b687e6

Browse files
author
Martin Peris
committed
Modified behavior of parameter autosize. When it is true it become full screen
1 parent e095ac4 commit 6b687e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

image_view/src/nodes/image_view.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,12 @@ int main(int argc, char **argv)
138138

139139
// Handle window size
140140
bool autosize;
141-
local_nh.param("autosize", autosize, false);
142-
cv::namedWindow(g_window_name, autosize ? (CV_WINDOW_AUTOSIZE | CV_WINDOW_KEEPRATIO | CV_GUI_EXPANDED) : 0);
141+
local_nh.param("autosize", autosize, true);
142+
cv::namedWindow(g_window_name, autosize ? (cv::WINDOW_NORMAL) : 0);
143+
if (autosize)
144+
{
145+
cv::setWindowProperty(g_window_name, cv::WND_PROP_FULLSCREEN, cv::WINDOW_FULLSCREEN);
146+
}
143147
cv::setMouseCallback(g_window_name, &mouseCb);
144148

145149
// Handle mirror

0 commit comments

Comments
 (0)