You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug, and it is occurring in different scenarios
first scenario - drawing image on a smaller canvas
cvui::image(frame, 0, 0, map);
calling cvui::image, when frame size is 1280x720 (width, height)
and the map image is larger, theRect is 1480x840
then the call to image() crashes on theImage.copyTo(theBlock.where(theRect));
int function render::image(theBlock, aRect, theImage);
the size of theRect is larger then theBlock!
need to resize, or not crash
when using movable EnhancedWindow with an image inside of it , and it is dragged out of frame
in this case, theRect has for example x=-10,y=10 if I drag it to the left , so the program crashes on same issue
cvui::image() on theImage.copyTo(theBlock.where(theRect));
But this does not give good beheivior because for example trying to draw larger image , just does not draw anything. maybe larger image should be resized?
It fixed the issue of dragging the window with an image. but it did not cover all ways the window is dragged.
Hope there is a solution
Thanks in advance
M.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. I think this problem you reported happens in different parts of cvui as well, when a frame to be rendered is larger than the available space, e.g. window area. I'll try to fix this problem by cropping the are that should not be displayed.
I found a bug, and it is occurring in different scenarios
first scenario - drawing image on a smaller canvas
cvui::image(frame, 0, 0, map);
calling cvui::image, when frame size is 1280x720 (width, height)
and the map image is larger, theRect is 1480x840
then the call to image() crashes on
theImage.copyTo(theBlock.where(theRect));
int function
render::image(theBlock, aRect, theImage);
the size of theRect is larger then theBlock!
need to resize, or not crash
when using movable EnhancedWindow with an image inside of it , and it is dragged out of frame
in this case, theRect has for example x=-10,y=10 if I drag it to the left , so the program crashes on same issue
cvui::image() on
theImage.copyTo(theBlock.where(theRect));
I tried adding if statement to resolve crashing,
But this does not give good beheivior because for example trying to draw larger image , just does not draw anything. maybe larger image should be resized?
It fixed the issue of dragging the window with an image. but it did not cover all ways the window is dragged.
Hope there is a solution
Thanks in advance
M.
The text was updated successfully, but these errors were encountered: