Finding the percentage to scale in img [closed]

I am trying to scale one img based on its size on the screen to a size of max space on my paper. I want to get a percentage so that way I could just plug it into my calculator and easily convert each size of the elements of the img to the proportional size of the space provided. The space on the paper is not proportional to the size of the original img. So the draw img doesn't have to take up the whole space in the space on the paper. The space is just for reference of how much is available.

closed as unclear what you're asking by Namaste, José Carlos Santos, Claude Leibovici, user91500, kingW3Sep 11 '17 at 17:31

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not sure exactly what you're looking for, but here's an example problem in this general domain. Suppose you have an original picture of dimensions $W \times H$, and you need it to fit into a space with dimensions $x \times y$.
Then compute $r_1 = x/W$ and $r_2 = y/H$, and find $r = \min\{r_1, r_2\}$. That is the scaling factor of the maximal copy of the original that will fit into the given space. The basic reasoning is that a scaling of $r_1$ will get the picture to fit just right horizontally, while a scaling of $r_2$ will get the picture to fit just right vertically. In order for it to fit in both directions, the picture must be scaled to the minimum of those two.