Try Pro FREE for 2 weeksGet Started

image-conditional-resize — Traditional AI Model

Snaps an image to the nearest standard tier — 512, 1024, 1536, 2048, 2560, 3072, 4096 — scaling up if it sits below one and down if it breaks the cap. Already-conforming images pass through untouched. CPU, instant.

Details

  • CategoryTraditional
  • Year-1
  • License

Inputs & Outputs

ImageInputimage

Source image to conditionally resize

ImageOutputimage

Conditionally resized output image

Parameters

keep_aspect_ratiobooleandefault true

Preserve aspect ratio

When true (default), resizes proportionally — the larger dimension hits the target tier and the smaller dimension scales by the same factor. When false, both dimensions are forced to the target tier (may stretch). Keep at true unless you specifically want a forced square output.

methodstringdefault Bicubicoptions: Bicubic, Bilinear, Lanczos

Interpolation method

Resampling algorithm. 'Bicubic' (default) gives the best balance for general photographic content. 'Bilinear' is fastest but slightly softer. 'Lanczos' produces the sharpest result but can introduce ringing on hard edges — best for upscaling, riskier for downscaling.

max_resolutionintegerdefault 4096options: 512, 1024, 1536, 2048, 2560, 3072, 4096

Max resolution cap

Upper bound on either dimension after resizing. Picks from standard tiers 512/1024/1536/2048/2560/3072/4096. Images at or above this size are downscaled to fit; smaller images are upscaled to the next tier. Default 4096 effectively disables the cap for typical content.

Tags

  • resize
  • scale
  • conditional
  • upscale
  • adaptive

Alternatives in Image Resizing

All AI models