They don’t keep certain pixels, instead they usually use clever algorithms (google nearest neighbor/bilinear/bicubic interpolation) to determine what the new pixel values should be.
To get a feel for it, imagine you are given a red square and a white square with a black square inbetween and asked what you think the color of the black square should be. You might “average” the two colors and get pink. These algorithms do exactly this, except in two dimensions and with more sophisticated methods than averaging.
Latest Answers