VIUCraft provides 4 operations for controlling image dimensions.
resize
Resize to specific dimensions or by scale factor.
| Param | Range | Description |
|---|---|---|
width | 1–10000 | Target width in pixels |
height | 1–10000 | Target height in pixels |
force | bool | Ignore aspect ratio |
scale | 0.1–4.0 | Scale factor (overrides width/height) |
Code
/resize-800-600/ # fit within 800x600
/resize-800-600-force/ # exact 800x600
/resize_scale_1.5/ # scale up 150%
crop
Extract a region from the image.
| Param | Range | Description |
|---|---|---|
left | 0–10000 | Left offset |
top | 0–10000 | Top offset |
width | 1–10000 | Crop width |
height | 1–10000 | Crop height |
Code
/crop-100-50-500-300/ # left-top-width-height
thumbnail
Smart thumbnail with crop strategy and optional letterbox.
| Param | Description |
|---|---|
width | Thumbnail width (50–10000) |
height | Thumbnail height (50–10000) |
crop | Strategy: centre, entropy, attention, none |
background | Letterbox fill color when crop=none |
Code
/thumb-300-300-attention/ # smart crop
/thumb-300-300-none-F5F5F5/ # letterbox with gray bg
smartcrop
Content-aware cropping using AI detection strategies.
| Param | Description |
|---|---|
width | Target width (50–10000) |
height | Target height (50–10000) |
strategy | attention, entropy, centre, high, low |
Code
/scrop-500-300-entropy/ # crop to detail-rich area