editing

crop_photo

Crop photos to an aspect ratio; imagic does the pixel maths.

What it does

aspect is a ratio such as "3:1" (panorama strip), "16:9", "4:5", "1:1", "9:16" (stories), "original", or "free" with box. The crop is the largest of that shape that fits the frame, scaled by size (1.0 = as big as possible, 0.5 = half as wide, a tighter crop) and centred at center_x / center_y, fractions of the frame (0 = left/top, 1 = right/bottom; it is nudged to stay inside). For a horizon or subject that is not centred, move center_y / center_x towards it, for example center_y=0.45 for a horizon just above the middle. box = [x0, y0, x1, y1] fractions sets the crop exactly (aspect "free"). clear=true removes the crop. Saved as the editor's crop, so exports are cropped and the editor shows the same frame. Returns the crop box as fractions and the result size.

Parameters

NameTypeRequired
aspect str optional
photo_id int | None optional
photo_ids list[int] | None optional
center_x float optional
center_y float optional
size float optional
box list[float] | None optional
clear bool optional

Asking for it

You do not call this by name. You say what you want, and the agent picks the tool:

Point imagic at my shoot and tell me what you find.

The rest of the editing tools

list_presets apply_preset apply_adjustments mask_adjust save_preset export_photos get_photo_edits

Where it runs

On your machine. imagic's MCP server is a local process that your AI client starts; the photos never leave your disk and nothing is uploaded. That is true of every tool in the reference, including this one.

To call it you need an MCP client connected to imagic. Setup takes about three minutes for Claude Code, Cursor, VS Code, Codex, Gemini CLI and ten others.

Give your AI the whole pipeline

crop_photo is one of 25 tools in imagic Max. The free 500-export trial includes all of them.