Resize without cutting off the edges: fit, crop, and padding
Resizing has two decisions: the dimensions of the output file and how the source image sits inside that frame. When their proportions differ, preserving the whole image creates padding; filling the frame removes some edges. Decide which outcome your task allows before choosing a mode.
This matters for product labels, screenshots, diagrams, and signature images. A centered crop can look tidy while removing a label or the end of a handwritten stroke. Check the content near all four edges, not only the subject in the middle.
The two scale calculations
For source width Ws and height Hs, and target width Wt and height Ht, Fit whole image uses scale = min(Wt/Ws, Ht/Hs). Multiplying both source dimensions by this one scale keeps the aspect ratio. The unused area becomes padding; the default centered placement divides it between opposite sides.
Crop to fill uses scale = max(Wt/Ws, Ht/Hs). The scaled image covers the frame, and parts outside it are clipped. TinyFileKit's general resizer uses these proportional calculations rather than stretching width and height independently. Neither mode can preserve every edge and also fill a differently proportioned frame without padding.
Worked example: a 1200 × 800 image in a 600 × 600 frame
This is a geometry example, not a measured quality result. Fit whole image uses min(600/1200, 600/800) = 0.5. The image becomes 600 × 400 inside a 600 × 600 output. Centering leaves 100 pixels of padding above and 100 below. The original edges remain visible, although their details have been resampled to fewer pixels.
Crop to fill uses max(0.5, 0.75) = 0.75. The scaled image is 900 × 600. A centered crop removes 150 output pixels from each side, equivalent to 200 pixels on each side of the source. Only the middle 800 of the original 1200 pixels remain: one third of the source width is removed overall.
If the destination allows any height, 600 × 400 matches the source ratio and needs neither padding nor cropping. This third option often suits an inline image better than forcing a square.
Pick a mode for the content
| Task | Choice | Check before export |
|---|---|---|
| Screenshot with text at the edges | Fit whole image | Padding is accepted; text remains readable |
| Square thumbnail with a central subject | Crop to fill | Subject and essential labels remain inside the frame |
| Image with a flexible output height | Match the original ratio | Calculate height from the requested width |
| Transparent artwork | Fit whole image with PNG or WebP | Transparency is enabled and accepted downstream |
| Handwritten signature | Inspect the trimmed image, then fit | No strokes were removed during trimming or resizing |
Resize and inspect
- Open Image Resizer and enter both target dimensions in pixels. For a matching ratio, calculate height = target width × source height / source width, then round to a whole pixel.
- Choose Fit whole image or Crop to fill based on the required framing.
- Select the output format and padding background. JPG replaces transparency with a solid color; transparent output requires PNG or WebP and the transparency option.
- Process one representative image before applying shared settings in Batch Image Editor. Different source ratios produce different padding or crops.
- Download and open the result at its actual dimensions, checking all edges and the final frame size.
Troubleshooting and output checks
Unexpected borders usually mean the source and target ratios differ while Fit whole image is selected. Use matching dimensions if the destination allows them; switch to cropping only if the content can tolerate it. A black or white area in a viewer can also be its display of transparency, so check the image on the background where it will be used.
Enlarging a small image produces more output pixels but does not recover missing detail. For a blurred label or thin signature, obtain a better original rather than repeatedly enlarging. Signature Resizer also trims light background margins before resizing; inspect that intermediate effect through the final preview. Confirm width, height, edge retention, background, and readable details before sharing.