Merge "Fix off-by-one bug of resize, when scale = 1; Use a better way to do scaling." into lmp-mr1-dev