High-quality image resizer

Resize JPEG, PNG, WebP, or AVIF images locally in your browser. Add several images, choose one set of output options, then resize each image when you download it. Files are not uploaded.

    Processing #

    The maximum dimensions define a box. Every output preserves the source aspect ratio and fits inside that box. Enlarge is off by default, so an image that already fits is not enlarged. When enlargement is enabled, Mitchell-Netravali reconstruction scales smaller images up to fit. Lanczos3 handles reductions.

    The page chooses the decoder from the selected file type and chooses the resizer after reading the decoded dimensions. This is direct dispatch in JavaScript; the page does not use <qip-step> fallback. The decoded image, resizer input and output, and encoder input use canonical RGBA8 sRGB KTX2.

    WebP lossy and JPEG show a quality slider. WebP lossless and PNG do not, because their pixel output is lossless. JPEG cannot store transparency, so its component composites transparent pixels against white. Quality numbers are specific to each codec; JPEG quality 85 and WebP quality 85 do not promise the same visual result.

    Processing is sequential to bound peak memory. The worker caches compiled Wasm modules, but each operation creates fresh component instances. Changing the maximum dimensions or output settings does not process or retain output images. Each row uses the settings in effect when Resize and download is pressed.

    The components limit images to 8192 pixels per edge and 25 megapixels. A compressed input must be no larger than 64 MiB. This tool creates new pixels and does not preserve indexed palettes, animation, or source metadata.

    Use the resize components directly #

    Set both dimensions explicitly:

    ./qip run -i input.ktx2 -o thumbnail.ktx2 \
      components/image/ktx2/ktx2-r8g8b8a8-srgb-resize-down-lanczos3.wasm \
      -u width=1200 -u height=800
    

    Omit one dimension to preserve the source aspect ratio. Omit both to halve with Lanczos3 or double with Mitchell. Each component accepts and emits canonical RGBA8 sRGB image/ktx2, is limited to 8192 pixels per axis and 25 megapixels, and reserves 287.4 MiB of fixed Wasm memory.

    The filters decode sRGB to linear light and premultiply alpha before sampling. They return straight-alpha sRGB bytes. Lanczos3 preserves detail well during reduction, but can ring around sharp high-contrast edges.