FLXCode Change Aspect Ratio

FLXCode apps

Appearance

Change Aspect Ratio

Pick a shape, then choose to cut the edges or add space around the picture. The pixels you keep are not resized.

or drop it here, or paste with Ctrl+V

JPG, PNG, WebP, HEIC, AVIF, GIF and BMP, up to 25 megapixels. Nothing is uploaded.

Works offline: load this page, edit one picture, turn off Wi-Fi, edit more. A JPG has no see-through areas, so they turn white.

Nothing you open or type is uploaded. How we count What this tool keeps and sends.

Problem or idea? Email us

How to change the shape of a picture

  1. Choose a picture, or drop or paste one.
  2. Pick a shape from the list, or type two numbers for your own.
  3. Choose how to get there: crop the edges, or add a colour, a blurred copy or see-through space.
  4. Move Position to decide which part is kept, or where the picture sits. Save as PNG or JPG.

How the new size is found

A shape a:b means width divided by height equals a divided by b. First the tool checks which way the picture is off: it is wider than the shape when W × b is at least H × a.

Crop keeps the full height of a wider picture and cuts the width down to H × a ÷ b, rounded down. A taller picture keeps its width and loses height. For a 4000 × 3000 photo and 4:5 the photo is wider, so the height stays 3000 and the width becomes 3000 × 4 ÷ 5 = 2400. Add does the opposite: it keeps the whole picture and grows the canvas, rounded up.

A shape you type is made into whole numbers first. 1.91 and 1 become 191:100. Position then splits the spare room: the offset is the spare pixels × position ÷ 100, rounded down.

wider = W × b ≥ H × a

crop wider ? ⌊H × a / b⌋ × H : W × ⌊W × b / a⌋

add wider ? W × ⌈W × b / a⌉ : ⌈H × a / b⌉ × H

offset ⌊spare × position / 100⌋

A 4000 × 3000 photo in every shape

Position is 50%, the middle. Both columns come from the same code as the tool.

ShapeCrop leavesCut from (x, y)Add makesPhoto sits at (x, y)
1:13000 × 3000500, 04000 × 40000, 500
4:52400 × 3000800, 04000 × 50000, 1000
16:94000 × 22500, 3755334 × 3000667, 0
9:161687 × 30001156, 04000 × 71120, 2056
3:24000 × 26660, 1674500 × 3000250, 0
4:34000 × 30000, 04000 × 30000, 0
2:32000 × 30001000, 04000 × 60000, 1500
21:94000 × 17140, 6437000 × 30001500, 0

Crop to 4:3 or add to 4:3 changes nothing here, because the photo already has that shape.

The same for a phone photo, 3000 × 4000

A portrait photo loses height where a landscape one loses width.

ShapeCrop leavesCut from (x, y)Add makesPhoto sits at (x, y)
1:13000 × 30000, 5004000 × 4000500, 0
4:53000 × 37500, 1253200 × 4000100, 0
16:93000 × 16870, 11567112 × 40002056, 0
9:162250 × 4000375, 03000 × 53340, 667
3:23000 × 20000, 10006000 × 40001500, 0
4:33000 × 22500, 8755334 × 40001167, 0
2:32666 × 4000167, 03000 × 45000, 250
21:93000 × 12850, 13579334 × 40003167, 0

What this does not do

  • It never scales. To get 1080 px wide or 1280 × 720, change the shape here, then use the image resizer.
  • Rounding can leave a cropped picture a fraction of a pixel off the shape, at most one pixel on one side.
  • The blurred copy is made from the picture itself, from a small shrunk version. It looks soft by design and is not a stretch of the photo.
  • The picture goes in at up to 25 megapixels. A result bigger than that, or 16.7 megapixels on iPhone, is refused.

Next: set the pixel size · crop by hand · work out a ratio or a size

FAQ

How do I make a wide photo fit a 9:16 story without cutting the sides?

Use "Story or Reel 9:16, blurred sides". The whole photo stays in the middle and a soft copy of it fills the space above and below. A plain colour works too.

Does changing the ratio make the picture smaller?

No. Crop only cuts away pixels and add only puts the picture on a bigger canvas. Every pixel you keep stays as it was.

How do I type a ratio like 1.91:1?

Pick "Type your own", then enter 1.91 and 1. Up to three decimals are read. The tool turns them into whole numbers, here 191:100.

Which part of the photo does crop keep?

The middle, at 50%. Slide Position to 0 to keep the left or top, or to 100 for the right or bottom.

Can the added space be see-through?

Yes, pick "Add see-through space" and save as PNG. A JPG cannot be see-through, so it turns white.

More from FLXCode

  • Crop ImageCrop a photo with drag handles, arrow keys or exact pixels. Presets for 1:1, 4:5 and 16:9. Nothing is uploaded.
  • Image ResizerResize photos by pixels, percent or preset for Instagram and email. Batch and zip. Nothing is uploaded.
  • Resize ImageMake a picture smaller by percent, pixels or preset in your browser. No upload, no watermark.
  • Aspect Ratio CalculatorSimplify width and height to a ratio, find the missing side, fit or fill a box, and get screen size from the diagonal.

Share Change Aspect Ratio