added support for proportional img scaling