Proportional image width height calculator

Original width: Original height:




Width and height

I wrote this php program because I needed a simple tool to calculate the width and height of an image when you scale it down.

It works simple. Enter the orginal width and height of an image. You will see the proportional values of width and height for the purpose of scaling down the image.

You can copy and paste the width and height values into the <img> tag of your html code.

When you see ~, the calculated width or height value is exactly in the middle between two integers, (e.g. 30.5) and is then rounded up (e.g. 31).

Code

You can see the html/php code of the page here as a txt file. You are free to use the code if you want to.