
Magnify an image to twice its original size.

     Every 4 pixels,                             become 16 pixels.
    +-------+-------+                    +-------+-------+-------+-------+
    |       |       |                    |       |       |       |       |
  i |   O   |   X   |                2*i |   O   |       |   X   |       |
    |       |       |                    |       |       |       |       |
    +-------+-------+                    +-------+-------+-------+-------+
    |       |       |                    |       |       |       |       |
i+1 |   @   |   #   |                    |       |       |       |       |
    |       |       |                    |       |       |       |       |
    +-------+-------+                    +-------+-------+-------+-------+
        j      j+1                       |       |       |       |       |
                                   2*i+2 |   @   |       |   #   |       |
                                         |       |       |       |       |
                                         +-------+-------+-------+-------+
                                         |       |       |       |       |
                                         |       |       |       |       |
                                         |       |       |       |       |
                                         +-------+-------+-------+-------+
                                            2*j            2*j+2


Here, each original pixel is copied three times.

      +-------+-------+-------+-------+
      |       |       |       |       |
  2*i |   O   |   O   |   X   |   X   |
      |       |       |       |       |
      +-------+-------+-------+-------+
      |       |       |       |       |
      |   O   |   O   |   X   |   X   |
      |       |       |       |       |
      +-------+-------+-------+-------+
      |       |       |       |       |
2*i+2 |   @   |   @   |   #   |   #   |
      |       |       |       |       |
      +-------+-------+-------+-------+
      |       |       |       |       |
      |   @   |   @   |   #   |   #   |
      |       |       |       |       |
      +-------+-------+-------+-------+
         2*j            2*j+2

A better strategy would average each pair of
adjacent original pixels (where R represents
the pixel value of the Right, B the pixel
value Below, and D the pixel value on the
Diagonal).

      +-------+-------+-------+-------+
      |       |  o+x  |       |  X+R  |
  2*i |   O   |  ---  |   X   |  ---  |
      |       |   2   |       |   2   |
      +-------+-------+-------+-------+
      |  o+@  |  o+#  |  X+#  |  X+D  |
      |  ---  |  ---  |  ---  |  ---  |
      |   2   |   2   |   2   |   2   |
      +-------+-------+-------+-------+
      |       |  @+#  |       |  #+R  |
2*i+2 |   @   |  ---  |   #   |  ---  |
      |       |   2   |       |   2   |
      +-------+-------+-------+-------+
      |  @+B  |  @+D  |  #+B  |  #+D  |
      |  ---  |  ---  |  ---  |  ---  |
      |   2   |   2   |   2   |   2   |
      +-------+-------+-------+-------+
         2*j            2*j+2
