Added support for scaling images