js:scale image in range with orignal percent