autodetect screensize from screenshot