The size of a given image can be easily enlarged by an integer scale factor
(2, 3, etc.) by repeating each of the pixels in the image. For example, a
2 by 2 image can be doubled by
This replication can be implemented equivalently by this two-step procedure:
An obvious problem of enlargement by replication is that the resulting image looks blocky, which can be avoided by using linear interpolation:
This operation is called bilinear interpolation (two-dimensional linear interpolation) which can be implemented equivalently by this two-step procedure: