Made images scale linearly below max size, instead of only to powers of 2