Set exact dimensions, preserve proportions or centre-crop. Enter dimensions in pixels. Lock proportions to avoid stretching. Centre-crop fills the target size and may trim the edges; contain fits the whole image inside it.
PNG, JPEG and WebP · up to 20 MB and 24 megapixels. Large images are reduced to a 4096px longest edge for editing. Keep your original file.
Choose portrait AI for people. For products on a plain backdrop, use solid-colour removal and click the background. Inspect edges before exporting; hair, glass and similar foreground/background colours can be difficult.
2. Resize
Enter dimensions in pixels. Lock proportions to avoid stretching. Centre-crop fills the target size and may trim the edges; contain fits the whole image inside it.
3. Compress & download
PNG keeps transparency without a quality slider. WebP supports transparency with adjustable quality. JPEG replaces transparency with the selected background colour. A smaller quality value does not guarantee a smaller file than your original.
800 × 600 into 800 × 800: padding or missing edges?
The geometric examples use our demonstration graphic; the separate photo cases use credited public photographs. These are controlled tests, not customer experiences. Download the exact input and outputs to inspect the result yourself.
Unlock proportions and enter 800 × 800. Contain uses scale min(800/800,800/600)=1: the full 800 × 600 image is centred with 100px above and below. Centre-crop uses scale max(800/800,800/600)=4/3: the image becomes about 1067 × 800 before about 133px is trimmed from each side.
Both downloads are exactly 800 × 800, but their content is different. Check the outer yellow circle and any labels near the edges. Select contain when every edge must survive; use centre-crop when filling the frame matters more than keeping every edge.
Changing the canvas ratio is different from stretching the subject. These results preserve the image proportions. Pixel positions are rounded, so an odd-sized image may place a one-pixel remainder on one side. Keep the original if another crop will be needed later.
A real coffee photo: square crop or keep the whole scene?
We opened the 600 × 400 CC0 photograph below in this site's workspace. With proportions unlocked, we exported two 600 × 600 PNGs without removing the background. Contain keeps the complete scene at 600 × 400 with 100 transparent pixels above and below. Centre-crop scales to 900 × 600, then trims 150 pixels from each side of that scaled image.
Original coffee scene · 600 × 400 · 466,706 bytesDownload this fileContain: complete scene with padding · 600 × 600 · 601,982 bytesDownload this fileCentre-crop: edges removed · 600 × 600 · 714,077 bytesDownload this file
Look at the saucer, spoon and surrounding table near the edges. Filling a square changes the composition; it does not simply shrink the original. The crop enlarges the photo by 1.5× and cannot create new detail. Both PNG exports are larger in bytes than the 466,706-byte original (601,982 and 714,077 bytes): matching dimensions is not a compression test.
A 400 × 300 banner without stretching the portrait
Start with the saved 512 × 512 AI cutout from the credited NASA portrait case. We reopened that exact 361,936-byte file in this workspace, unlocked proportions and selected 400 × 300 with Contain. This follow-up test changes the layout and export format; the original AI edge limitations still apply.
The scale is min(400/512,300/512)=0.5859375. The portrait canvas becomes 300 × 300 inside a 400 × 300 output, leaving 50px on each side. The subject is not stretched to 4:3. With Centre-crop instead, the square would scale to 400 × 400 and lose 50px above and below; that can cut off the head or held object.
Suppose an upload requires transparency and a maximum of 100 KB (100,000 bytes). PNG is over that limit here; the 21,436-byte WebP meets both conditions if the destination accepts WebP. The 18,277-byte JPEG is smaller but its white rectangle will cover a coloured page background. If the destination accepts only transparent PNG, keep that requirement and adjust dimensions or use another preparation method; changing to JPEG does not satisfy it.
These browser downloads use the same 400 × 300 pixels. Size changes from the 512 × 512 input include resizing as well as encoding. WebP/JPEG are lossy; inspect hair and helmet edges against your intended background. Credit: NASA · Eileen Collins. Source and usage notes · Settings, bytes and transparency record
Geometric fixture export date: 17 November 2026; photograph exports: 19 November 2026. Explanation reviewed: 19 November 2026. Layout values are rounded; re-encoding in another browser may produce different bytes.
Your image is processed on this device. Portrait AI downloads a model from Hugging Face; image pixels are not sent there. Site analytics and advertising may make separate network requests.