Processing images
Depicta provides 20 server-side image processing operations. Each takes an input image and returns a processed result via signed URL.
Why processing matters
Section titled “Why processing matters”Generative AI models are powerful at creating images, but they are not a replacement for traditional image processing. An AI model can generate a stunning product photo, but it can’t reliably crop it to exact pixel dimensions, convert it to WebP for your website, or strip unwanted metadata (with legal limits). Processing operations handle the precise, deterministic work that AI generation was never designed for.
Your AI assistant can chain generation and processing together — generate an image, remove the background, resize it to the exact dimensions needed, and convert to the right format — all in one workflow.
API pattern: POST /v1/process/{operation} with multipart form data (field name: image).
CLI pattern: depicta process {operation} <input> [options]
Color adjustments
Section titled “Color adjustments”adjust
Section titled “adjust”Adjust brightness, contrast, and saturation. Values range from -100 to 100.
depicta process adjust photo.png --brightness 20 --contrast 10 --saturation -15| Parameter | Type | Description |
|---|---|---|
brightness | integer | -100 to 100 (default: 0) |
contrast | integer | -100 to 100 (default: 0) |
saturation | integer | -100 to 100 (default: 0) |
grayscale
Section titled “grayscale”Convert to grayscale.
depicta process grayscale photo.pngNo additional parameters.
invert
Section titled “invert”Invert pixel values (photographic negative effect).
depicta process invert photo.pngNo additional parameters.
Geometry
Section titled “Geometry”Extract a rectangular region.
depicta process crop photo.png --x 100 --y 50 --width 800 --height 600| Parameter | Type | Required | Description |
|---|---|---|---|
x | integer | yes | Left offset in pixels |
y | integer | yes | Top offset in pixels |
width | integer | yes | Crop width |
height | integer | yes | Crop height |
resize
Section titled “resize”Resize with aspect ratio preservation. Provide width, height, or both.
depicta process resize photo.png --width 512| Parameter | Type | Description |
|---|---|---|
width | integer | Target width (aspect ratio preserved if height omitted) |
height | integer | Target height (aspect ratio preserved if width omitted) |
rotate
Section titled “rotate”Rotate by an arbitrary angle. Areas outside the original bounds are filled with the background color.
depicta process rotate photo.png --angle 45| Parameter | Type | Required | Description |
|---|---|---|---|
angle | number | yes | Rotation angle in degrees |
Mirror horizontally or vertically.
depicta process flip photo.png --direction horizontal| Parameter | Type | Required | Description |
|---|---|---|---|
direction | string | yes | horizontal or vertical |
Auto-trim uniform borders (e.g., white space around an image).
depicta process trim photo.png --tolerance 10| Parameter | Type | Description |
|---|---|---|
tolerance | integer | Color difference threshold (default: 0) |
Add padding to reach a target size. The image is centered on the canvas.
depicta process pad icon.png --width 512 --height 512| Parameter | Type | Required | Description |
|---|---|---|---|
width | integer | yes | Target canvas width |
height | integer | yes | Target canvas height |
Cleanup
Section titled “Cleanup”remove-background
Section titled “remove-background”Remove the background, producing a transparent PNG.
depicta process remove-bg photo.pngNo additional parameters. Output is always PNG (transparency).
denoise
Section titled “denoise”Reduce chroma noise.
depicta process denoise photo.png --strength 50| Parameter | Type | Description |
|---|---|---|
strength | integer | Noise reduction strength (default: 50) |
sharpen
Section titled “sharpen”Apply unsharp mask sharpening.
depicta process sharpen photo.png --amount 1.5 --threshold 0| Parameter | Type | Description |
|---|---|---|
amount | number | Sharpening strength (default: 1.0) |
threshold | number | Edge detection threshold (default: 0) |
Apply Gaussian blur.
depicta process blur photo.png --radius 5| Parameter | Type | Required | Description |
|---|---|---|---|
radius | number | yes | Blur radius in pixels |
Format and metadata
Section titled “Format and metadata”convert
Section titled “convert”Convert between image formats.
depicta process convert photo.png --format webp| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | yes | png, jpg, or webp |
optimize
Section titled “optimize”Reduce file size via color quantization without visible quality loss.
depicta process optimize screenshot.png --colors 256| Parameter | Type | Description |
|---|---|---|
colors | integer | Max colors for quantization (default: 256) |
min_psnr | number | Minimum quality threshold in dB |
metadata-strip
Section titled “metadata-strip”Strip EXIF and XMP metadata. C2PA Content Credentials are preserved — this operation only removes non-provenance metadata.
depicta process metadata-strip photo.jpg| Parameter | Type | Description |
|---|---|---|
keep_icc | boolean | Preserve ICC color profile (default: false) |
Compositing
Section titled “Compositing”overlay
Section titled “overlay”Composite one image on top of another.
depicta process overlay background.png --overlay logo.png --x 20 --y 20 --opacity 0.8| Parameter | Type | Required | Description |
|---|---|---|---|
overlay | file/URL | yes | Image to overlay |
x | integer | no | Left offset (default: 0) |
y | integer | no | Top offset (default: 0) |
opacity | number | no | 0.0–1.0 (default: 1.0) |
alpha-to-color
Section titled “alpha-to-color”Replace transparency with a solid color.
depicta process alpha-to-color icon.png --color "#FFFFFF"| Parameter | Type | Description |
|---|---|---|
color | string | Hex color (default: #FFFFFF) |
color-to-alpha
Section titled “color-to-alpha”Make a specific color transparent.
depicta process color-to-alpha logo.png --color "#FFFFFF" --tolerance 30| Parameter | Type | Description |
|---|---|---|
color | string | Hex color to make transparent |
tolerance | integer | Color matching tolerance (default: 0) |
Orientation
Section titled “Orientation”auto-orient
Section titled “auto-orient”Apply EXIF orientation metadata and strip the tag. Useful for photos from phones that appear rotated.
depicta process auto-orient photo.jpgNo additional parameters.