Scale DOWN-- What if the image is being shrunk?

There are no ¡¥holes¡¦ created in the resulting image.
But a decision must be made on the most appropriate pixels too.
Selecting the exact response depends on the algorithm used.

Hint: let's calculate the new_pixel from "left to right" and "bottom to top".

Case 01:

You will get this result if you use a "round up" approach

For example:

The new position of pixel (1,1) with xScale=0.5, yScale=1 :

x'= 1*0.5 =0.5 --> 1

y'= 1*1 = 1 -->1

Now, pixel (1, 1) becomes Red


The new position of pixel (2,1) with xScale=0.5, yScale=1 :

x'= 2*0.5 =1

y'= 1*1 = 1

Now, pixel (1, 1) becomes Pink

 

Case 02:

You will get this result if you use "round down" approach

For example:

The new position of pixel (2,1) with xScale=0.5, yScale=1 :

x'= 2*0.5 =1

y'= 1*1 = 1

Now, pixel (1, 1) becomes Pink


The new position of pixel (3,1) with xScale=0.5, yScale=1 :

x'= 3*0.5 =1.5 -->1

y'= 1*1 = 1 -->1

Now, pixel (1, 1) becomes Yellow

 

Case 03:

You will even get this result by some algorithms.

Let's do it by using pen and graph paper:

8X Zoom

4X Zoom

1X Zoom