Commit a6dc2962 authored by Davis King's avatar Davis King

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.
parent 6d55fcc2
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment