Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

Image Resizer

bars-32x16.png stretched to 20 by 10 is a 20 by 10 PNG. The aspect ratio is not kept, so the bars get shorter and narrower by different factors. Fitting the same bars inside a 16 by 16 box keeps the ratio. The limiting side is the width: 16 divided by 32 is one half, so the result is 16 by 8. The height you typed, 16, is not reached. The message says "inside" for that reason.

New

Exact size stretches the picture. Fit-inside keeps the aspect ratio, so one side can be shorter than the number you typed. Output is PNG.

How to use

  1. Stretch bars-32x16.png to 20 by 10 when you want the exact box.
  2. Fit the same bars inside 16 by 16 when you want 16 by 8.
  3. Choose fit for a photograph so a portrait is not squashed.

Formula / how it works

bars-32x16.png stretched to 20 by 10 is a 20 by 10 PNG. The aspect ratio is not kept, so the bars get shorter and narrower by different factors. Fitting the same bars inside a 16 by 16 box keeps the ratio. The limiting side is the width: 16 divided by 32 is one half, so the result is 16 by 8. The height you typed, 16, is not reached. The message says "inside" for that reason.

Output is PNG. There is no JPEG quality slider on this page. If you need JPEG, convert after. The maximum side is 8000 pixels. A request for 0 or for 9000 stops. Fit-inside never stretches. Exact size always can. Pick the select on purpose. The default in the form is exact, which is the stretch, so a careless press will distort a portrait. The fit option is the one to choose for a photograph.

GIF frames after the first are not resized as an animation. You get one PNG of the decoded frame. EXIF is not copied, because the pixels are drawn onto a new canvas.

Stretching bars-32x16.png to 20 by 10 really is 20 by 10, and the bars are distorted because the factors differ. Fitting the same bars inside 16 by 16 yields 16 by 8, because half of 32 is 16 and the height follows. The unused part of the square is not painted as a margin. The output is PNG. The default select is the stretch, so a portrait needs the fit option on purpose. Sides above 8000 are refused.

Half of 32 is 16 and half of 16 is 8, which is the whole of the fit sample. The stretch sample ignores that ratio and forces 20 by 10. White is not added around a fitted image. The canvas is only as large as the drawn picture. If you need a square file with a margin, that is a different operation from fit-inside. GIF and WebP still become one PNG of the decoded frame.

Cut a rectangle first with image cropper. A JPEG of the PNG is PNG to JPG.

Worked examples

Stretch the bars to 20 by 10

Inputs: irs-f: bars-32x16.png | irs-w: 20 | irs-h: 10 | irs-aspect: no

On this page, take bars-32x16.png, then 20, then 10, then no and press Resize. Exact size can distort. Fit inside will not.

Result: Resized exactly to the box: 20×10 PNG. Aspect is not kept, so the picture stretches. 0.1 KB

Fit the bars inside 16 by 16

Inputs: irs-f: bars-32x16.png | irs-w: 16 | irs-h: 16 | irs-aspect: yes

On this page, take bars-32x16.png, then 16, then 16, then yes and press Resize. Exact size can distort. Fit inside will not.

Result: Resized inside the box: 16×8 PNG. Aspect is kept, so one side may be shorter than the number you…

Use cases

  • Making a 20 by 10 distortion on purpose.
  • Fitting a 32 by 16 icon inside a square without stretching.
  • Seeing that the unused side of the box is not filled by scaling up the short side.
  • Stopping at 8000 pixels rather than building a giant canvas.

Tips & limitations

  • The form defaults to exact size, which stretches.
  • Fit uses the smaller of the two scale factors.
  • Output is PNG, with no JPEG slider.
  • One GIF frame is resized, not the whole animation.

FAQ

Why is the stretch 20 by 10?

Those are the numbers you typed, and aspect was set to no, so the bars are distorted to that box.

Why is the fit 16 by 8 rather than 16 by 16?

Half of 32 is 16 and half of 16 is 8. The width hits the box first. The height stays in proportion.

Will a portrait be squashed if I leave the default?

Yes, if the box does not share the portrait ratio. Switch to fit inside.

Is there a JPEG quality control?

No. Convert the PNG afterwards if you need JPEG.

What is the largest side?

8000 pixels. 0 and 9000 are refused.

Does an animation survive?

No. One decoded frame becomes one PNG.

20 by 10 and 16 by 8 describe bars-32x16.png. A square photo fitted into a wide box will letterbox by being shorter, not by adding bars.