mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fixed a bug where the imglab tool would sometimes start out with an annoyingly
small window when the first image was bigger than the screen.
This commit is contained in:
parent
6d55fcc260
commit
a6dc296219
@ -17,7 +17,7 @@
|
||||
#include <dlib/dir_nav.h>
|
||||
|
||||
|
||||
const char* VERSION = "0.8";
|
||||
const char* VERSION = "0.9";
|
||||
|
||||
|
||||
|
||||
|
@ -449,11 +449,12 @@ load_image_and_set_size(
|
||||
if (needed_width < 300) needed_width = 300;
|
||||
if (needed_height < 300) needed_height = 300;
|
||||
|
||||
if (needed_width+50 < screen_width &&
|
||||
needed_height+50 < screen_height)
|
||||
{
|
||||
set_size(needed_width, needed_height);
|
||||
}
|
||||
if (needed_width > 100 + screen_width)
|
||||
needed_width = screen_width - 100;
|
||||
if (needed_height > 100 + screen_height)
|
||||
needed_height = screen_height - 100;
|
||||
|
||||
set_size(needed_width, needed_height);
|
||||
|
||||
|
||||
display.set_image(img);
|
||||
|
Loading…
Reference in New Issue
Block a user