Added support for scaling (bilinear interpolation)