Added scaling for input (not only screen image)