# Little math mistake

## Recommended Posts

I was working in Paint.NET, and I wanted an image to be half as big as it was then. But when you go to resize image, and use 50%, only 25% of the image remains.

What do I mean? Well, just imagine that you have an image that has a resolution of 800*600 pixels. The total amount of pixels is 800*600=480000 pixels. So 50% of the size means that you should have 0.5*480000=240000 pixels. That means the image should have a size of

(*800)*(*600) pixels=565.685425*424.264069 pixels, so this should result in an image of 566*424 pixels.

Instead, Paint.NET makes the image 400*300 pixels.

And now so that everyone can understand it:

This is an image of 800*600. I've filled it up with rectangles of 400*300, the size that you get when resizing by 50%. As you can see, the image of 400*300 fits in 4 times, instead of the expected 2 times. So this image is not twice as small, but it is four times smaller (25%) than what you started with, even though you really wanted it to be 50% smaller.

So the mistake in the program simply is, that you guys forgot that images have two dimensions. You should get half the total amount of pixels, not half the lengths of the sides...

##### Share on other sites

So the mistake in the program simply is, that you guys forgot that images have two dimensions. You should get half the total amount of pixels, not half the lengths of the sides...

No. You're making an assumption about the way things should be. Your assumption is wrong.

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

##### Share on other sites

So the mistake in the program simply is, that you guys forgot that images have two dimensions. You should get half the total amount of pixels, not half the lengths of the sides...

No. You're making an assumption about the way things should be. Your assumption is wrong.

I don't make an assumption, I just show how the math behind a two dimensional image works. So I don't see how I can be wrong with this, it's just how it works in math.

If an image fits four times inside another image, then this image is 1/4 times the size of the larger image. So it is just 25% the size, not 50%. I can't see how I could be wrong with that...

##### Share on other sites

I'm not saying your math is wrong, I'm saying the percentage applies to the sides, not area. This is by design.

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

##### Share on other sites

I'm not saying your math is wrong, I'm saying the percentage applies to the sides, not area. This is by design.

Well, in my daily use of Paint.NET, it's quite annoying... 50% of each side is just tick the maintain aspect ratio box + half the size of one of the sides... And there is no way you can think of what should be the size of the sides when actually resizing the image by 50%...

So maybe it would be nice to have an extra option with canvas size and resize, a box to choose between resize by side and resize by pixels...

##### Share on other sites

there is no way you can think of what should be the size of the sides when actually resizing the image by 50%

robbertzzz,

I agree, maybe it would be a nice option.

A work-around is to use the Move Selection tool.

Select the entire canvas. Ctrl + A

The pixel count is shown at the bottom in the taskbar.

Use a calculator to figure the pixel count at your desired percentage.

Use the Move Selection tool on a corner adjusting node,

with the shift key held down,to get as close as possible to

The width and height will be shown in the taskbar,

and can then be entered into the resizing window.

Not convenient, but workable.

##### Share on other sites

So the mistake in the program simply is, that you guys forgot that images have two dimensions.
Wow. Yeah thanks for reminding me. I totally forgot about that second dimension! Jeez. How about this: go write your own image editor, have "resize to 50%" work the way you describe, and then you can tell every single user that e-mails you about it, "you're wrong."

People expect 50% to reduce the sides by 50%, not the pixel area by 50%. Those who want the latter can whip out their calculator (clearly yours is a big huge powerful one btw) and figure out what numbers to punch into the Image->Resize dialog.

I don't know why you decided to come here and argue about something that you're wrong about. While you rant, I'm going to go look for someone who cares.

Congratulations on the first post of the decade that needed to be closed because it was so lame. Oh woops ... do we count 2010 as part of the first or the second decade of the century? Hmm. I'll have to go looking for a second person who cares.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html