The Calculator
How to Use It
- Simply put in the width and height of the original image.
- Then enter a value into either the target width or target height. The other value will be calculated automatically. And you can tweak the numbers and have it update automatically.
What It Does
Any image editing software or app worth its salt will of course give you the option of preserving the aspect ratio of an image when resizing it. Otherwise, you’d constantly end up with images that are squashed or stretched in one dimension. So if you’re just resizing an image in an app, you probably don’t need to calculate the pixel dimensions manually.
But there are also times that I need to calculate the pixel dimensions of a resized image without running it through an image editing app. A common situation where I run into this need is when adjusting html code for resized images. It’s not technically resizing the image–it’s changing the display size for it.
So I’m posting this here mainly for my own use. But if someone else happens to find it useful, great!
This rounds to the nearest whole number, because I find that the most useful when working with pixel dimensions. That said, it’s agnostic on the type of measurements–eg. pixels or inches or miles–so long as they’re the same type for all fields.