0 votes

You need to think about the size of the original image (which is the number on the first line of the file that you are reading) and the size of the window that the image will be drawn in.

For example, if the image is size 200 and the window size 600, then each of the x and y coordinates would be multiplied by 3 to scale them up.

If the image is size 1000 and the window size 600, then each of the x and y coordinates would be multiplied by 0.6 to scale them down.

You need to generalize so that no matter the size of the image or the value of WINDOW_SIZE you can compute the multiplier you need.