Resize an image to exact pixel dimensions, a percentage or a ready-made size: fit, fill, or stretch. Everything happens on your device.
All three make images “smaller”, but in different ways. Picking the right one avoids blurry or squashed results.
Screens only care about pixels. Paper cares about pixels per inch. Your current output (1920 × 1440) at different print qualities:
Tap any size to load it into the resizer above.
A zone plate is a ring pattern whose detail gets finer towards the edge, reaching the finest a 480 px image can hold. Shrinking it shows a filter’s two jobs: keep the rings that still fit, and turn the ones that don’t into flat grey. Anything left in the grey zone is aliasing, false rings that were never in the source.
w(x) = sinc(x)·sinc(x/3) for |x| < 3A sinc windowed to three lobes. The closest of these to an ideal low-pass filter, most detail kept, least aliasing, at the cost of the most taps and visible ringing next to sharp edges.Image files store sRGB values, which are gamma-encoded: 128 is about 22% of white’s light, not 50%. A resizer that averages stored values makes fine detail darker and shifts colours. Below, alternating one-device-pixel stripes are shrunk 2× three ways, including by your own browser.
Tap counts are computed by the same weight code the lab uses. Library defaults are from general knowledge of current documentation: check the linked docs for the version you run.
w(x) = 1 if −½ < x ≤ ½ · not widenedCopies one pixel. Sharp and fast, worst aliasing.w(x) = 1 − |x| · not widenedWhat a GPU texture lookup does without mipmaps; skips most pixels when shrinking.w(x) = 1 if −½ < x ≤ ½ · widenedAverages the covered pixels. Cheap, slightly soft, some residual aliasing.cubic, B = 0, C = ½ (Keys a = −½)Interpolating cubic; crisp with mild edge halos.cubic, B = ⅓, C = ⅓Mitchell: Netravali’s recommended balance of blur, ringing and anisotropy.w(x) = sinc(x)·sinc(x/3) for |x| < 3Closest to an ideal low-pass here; most taps, strongest ringing.ctx.imageSmoothingQualityDefaults to "low". The algorithm behind low/medium/high is up to the browser; filtering happens on stored sRGB values.image-renderingauto (browser’s choice), smooth, pixelated or crisp-edges for scaled <img> and backgrounds.Image.resize()Bicubic by default since Pillow 7.0 (nearest for palette and 1-bit images). Support widens when shrinking; works on stored values.magick in.jpg -resize 50% out.jpgLanczos for most shrinks; Mitchell when enlarging or for images with transparency or a palette. Add -colorspace RGB … -colorspace sRGB for linear light.vips resize · sharp().resize()Lanczos-3 kernel by default, after a fast box shrink for large factors.-vf scale=1280:-2swscale defaults to bicubic; flags=lanczos or flags=area change it.Image Size › Resample“Automatic” picks Bicubic Sharper for reductions and Preserve Details or Bicubic Smoother for enlargements.canvas.toBlob(cb, "image/jpeg")yescanvas.toBlob(cb, "image/png")yescanvas.toBlob(cb, "image/webp")yescanvas.toBlob(cb, "image/avif")no"imageSmoothingQuality" in ctxyes{ resizeWidth, resizeQuality }yestypeof OffscreenCanvasyesblack/white stripes → 127 (light ≈ 188, value 128)noResizing is often one step. These handle the rest.