Frontend: scanner: optimize the maximization of the scan area

Signed-off-by: Jerome Flesch <jflesch@gmail.com>