ImageStretcher

← Blog

How to Stretch a PNG Without Losing Quality

ImageStretcher

Stretch a PNG online without turning hard edges into mush — remap width and height in your browser, keep alpha when you export PNG, and know when enlarge will still look soft. Free; no upload.

People who type stretch png usually already have the file: a mark with a hard edge, a UI capture, a sticker whose middle is a hole. They need a new width and height. The fear is a soft halo after a naive enlarge, or a circle that stops being a circle when only one axis moves.

Those are different jobs. Softness is interpolation inventing pixels the file never stored. Warp is the same pixels remapped onto a different box. ImageStretcher’s home canvas does the remap in the browser. It will not invent a sharper edge than the one you uploaded. On this page “quality” means the hole stays a hole, the slanted side is not crushed into JPEG blocks, and you stop when the preview lies about the shape.

The photograph under this paragraph is the only source. It is one die-cut sticker: a flat indigo hexagon with a round hole, on warm gray paper. No letters, no second object.

A flat indigo hexagon sticker with a round hole, centered on warm gray paper, 1248 by 832
Source, 1248×832. The paper and the hole are the same gray. Later files on this page are this bitmap.

One sticker, measured before it is stretched

The hexagon occupies 721×626 pixels, from x=269 and y=106. A flat-top hexagon is wider than it is tall; 721/626 is the regular shape, not a stretch. The hole occupies 172×181, from x=543 and y=327. Nine pixels of that extra height are the vinyl rim inside the box. It still reads as a circle. The pale outline around the vinyl is the cut edge from the photograph. It stays in the file. It is not a second shape drawn on afterwards.

Read the two boxes as nested, not as two objects. The hole box sits inside the hexagon box. The rim is pale enough to count in both, which is why the hole is not a perfect 1:1 in the pixel count even though the eye calls it a circle. Any later file on this page maps those same two boxes. When only the width changes, both boxes get wider and neither gets taller. When both axes move by the same factor, both boxes keep the proportion they have here.

The hole survives PNG and disappears in JPEG

The paper was one flat color, including the disk you see through the hole. Knocking that color out makes both the margin and the hole transparent. That is the PNG you would keep. The checker behind the sticker is the page, not pixels baked into the file. Download as PNG and the next app still gets the hole.

JPEG has no alpha. The stretcher’s JPEG export paints #ffffff under the canvas before it encodes, which is the same bake as the file on the right. The hole is still 172×181 pixels of color, and that color is now white. A white disc on a white ground is not a hole. WebP can keep alpha in many pipelines. For a sticker or a UI cutout, PNG remains the master.

The hexagon sticker with the paper and the hole removed, so both read as transparency, 1248 by 832
PNG master, 1248×832. Hole 172×181, empty. Hexagon 721×626.
The same sticker on a white ground, the hole filled white, 1248 by 832
JPEG bake, same box. The hole is white #ffffff, not empty.

Put that white file on a colored page and the hole comes back as a white disk, which is a patch, not a window. The checker on the left is drawn by the page so you can see the empty pixels. It is not stored in the WebP. A stretch jpg pass in the same tool is this remap with a lossy export. A cutout stays PNG. A photo that only has to meet a size cap can leave as JPEG or WebP, and compress image comes after the pixel box is already right.

The slant is where enlarge spends the file

Uniform enlarge keeps the aspect ratio and only changes size. The damage shows first on a diagonal, because a slanted edge is a staircase of pixels even when the sticker looks smooth at 1248 wide.

The crop is 80×80, taken at x=307 and y=242, on the upper-left slant. Drawn up to 640×640 with smoothing turned off, each source pixel becomes an 8-pixel square. The pale rim breaks into steps. That is the enlarge a PNG cannot refuse: the format stores the pixels you have, and a bigger box has to invent the ones between them. A smooth scale hides the steps by blending. It does not recover a sharper knife-cut than the photograph contained.

An 80 by 80 crop of the hexagon's upper-left slant, the pale vinyl rim against transparency
Slant, 80×80, from x=307, y=242.
The same 80 by 80 slant drawn to 640 by 640 with no smoothing, so the rim breaks into steps
Same crop, nearest neighbor, 640×640. Eight screen pixels per source pixel.

The smooth enlarge of the whole sticker is 1872×1248, one and a half times each side. The hole becomes 258×272. Divide 258 by 172 and 272 by 181 and you get the same 1.5, so the hole is still the shape it was. The hexagon becomes 1082×939. The slant is cleaner than the blocky crop beside it, and it is still only a blend of the original rim. The canvas default is that blend. Turning smoothing off is how the 640-pixel crop was made, and it is the look people mean when they say an enlarge went crunchy. PNG did not lose a hidden sharp layer. The sharp layer was never in the 80-pixel crop.

The sticker scaled evenly to 1872 by 1248, the hole still nearly round at 258 by 272
Even scale, 1872×1248. Hole 258×272. Hexagon 1082×939. Proportion held. No new detail.

Width and height do not share the hole

Axial stretch fills a named banner and accepts a new geometry. The format does not cancel that. Unlocking width from height on this PNG turns the circle into an ellipse because every pixel, including the hole, is remapped.

Width 1872 and height still 832 makes the hole 258×181 and the hexagon 1082×626. Only the width moved. Height 1248 and width still 1248 makes the hole 172×272 and the hexagon 721×939. The sticker is fully in the frame either way. A center crop would have thrown the points away. That trade is the subject of stretch without cropping.

The sticker stretched only wider, to 1872 by 832, the hole a horizontal ellipse of 258 by 181
Width only, 1872×832. Hole 258×181. Hexagon 1082×626.
The sticker stretched only taller, to 1248 by 1248, the hole a vertical ellipse of 172 by 272
Height only, 1248×1248. Hole 172×272. Hexagon 721×939.

The wide file baked for JPEG keeps the 258×181 ellipse and paints it white. You can see the squash, and you can no longer see through it. A face or a wordmark that has to stay geometrically true fails the same way.

The 1872 by 832 stretch again, hole still empty, so it can sit beside the JPEG
Same 1872×832 PNG. The ellipse is still a hole.
The 1872 by 832 stretch on white, the elliptical hole filled white
Same pixels, JPEG white. Hole 258×181, filled.

A short strip squashes the hole on purpose

1872×624 is a 3:1 strip of this sticker. The hole becomes 258×136. The hexagon becomes 1082×470. Nothing was cropped: the left and right points are still there, and they are shorter. That file is a banner. It is the wrong file when the hexagon is a mark that has to stay regular. Named pixel boxes, when you already know them, also sit under stretch image for common sizes.

The sticker stretched to a 1872 by 624 strip, the hole a flat ellipse of 258 by 136
Strip, 1872×624. Hole 258×136. Hexagon 1082×470.

The even file above kept the hole’s proportion. This strip does not. Use it when the brief names a short banner. Stop when the mark has to stay a hexagon, and grow margin with the [AI image expander](/ai-image-expander) when the subject itself must not move.

Stretch the PNG in the browser

The canvas does not need an account for a normal download. Photos use the home canvas. The engine is the same. A named aspect preset keeps the ratio the file already has, so the wide sticker on this page is typed as two numbers under Free, not picked from a 16:9 card.

  1. Open the home tool and drop the PNG, or paste a capture that arrived as PNG.
  2. Choose Free under Aspect, then type Width and Height. Unlock stretch ratio is the factor control, not a second way to free the aspect.
  3. Watch the hole and one slanted side in the preview before you commit.
  4. Download PNG when the next step still needs the hole. JPEG paints that hole white. WebP can keep alpha; a sticker master is still PNG.

The hexagon on this page is already the file. Set the box, keep PNG when the hole has to survive, and stop when the hole stops being round.