auto_rig_from_layersAuto-rigs role-named PNG layers (face, eye_L/eye_R and either mouth or the lip set (mouth_inner + lip_lower + lip_upper, a mouth that folds open instead of crossfading) required; iris_L/R, brow_L/R, hair_front, body, arm_L/arm_R, forearm_pose_L/forearm_pose_R, hair_side_L/hair_side_R, mouth_tongue/mouth_teeth (only with the lip set: drawn under its lips and clipped to mouth_inner), etc. optional; an arm needs the body, a pose forearm needs its arm, a side lock needs hair_front, and a partial lip set, one mixed with mouth/mouth_open, or mouth_tongue/mouth_teeth without it is refused) into a renderable .iki written to disk. Pass full-canvas PNG file paths; returns the output path + summary (the model is NOT inlined). Filenames map to roles unless `fileName` is given. The result's `folds` is the written rig's fold report, printed after the path the way render_poses prints it, and report-only: a fold never refuses the rig. The `RIGPLAN:` line (the result's `rigPlan`: `effective`, `clamped`, `overriddenBy`) follows the path and precedes the `PATCH` lines. The `PHYSICS` lines follow the fold report (the result's `physics`), one per physics rig output — a spring's, or each chain segment's — reading ok, frozen or unstable with the step and idle amplitudes, or `PHYSICS: no rigs`; report-only too. With side locks and a `nose` (which `turn` needs) the `HAIRSIDE` lines follow the `PHYSICS` lines (the result's `turn.hairSide`), each naming the lock's role, report-only as well. `patches` (see its field) adds displacements to existing keyform stops of the freshly generated rig; each op then prints one line between the path and the fold report — `PATCH <i> <target> at <Param=v …>: <moved> of <of> points (cols a-b, rows c-d), largest move <maxPx> model px`, with `(vertices)` in place of the columns and rows for a mesh part — and the result's `patches` carries the same reports (`index`, `target`, `at`, `moved`, `of`, `cols`/`rows` for a grid, `maxPx`), present whenever `patches` was passed, `[]` included. An op the input schema accepts but the rig refuses comes back as `INVALID: patches[i]…` and nothing is written; an op with a missing field or a field of the wrong type is the SDK's input validation error. `customParts` adds parts the rig has no role for (a twin tail, a hairpin), each from a canvas-sized PNG of its own, as an unrigged mesh on `headDeformer` after its `after` role's parts; it needs @ikijs/mcp 0.34.0, and an older server drops the field and returns no `customParts`. A part can declare `occlusion` (hidden where named roles' paint covers it, by an amount keyed on a parameter; it needs 0.35.0, and an older server refuses the key as `INVALID: customParts[i]…`); its `CUSTOM <id>:` line then ends `, hidden by <id>,<id>… on <parameter> at <value>:<amount> <value>:<amount>…`, and the result's part carries `occlusion` (`by` as the part ids written, `parameter`, `stops`). The result's `customParts` (`parts`: `id`, rest `box`, `mesh`, `order`, atlas `page`) is present whenever the input was passed, `[]` included, and one `CUSTOM <id>: …` line per part follows the `HAIRSIDE` lines. `bakes` (see its field) moves the custom parts with a parameter and needs `customParts`; each part and parameter it moves then prints one `BAKE <part> <param>: <n> vertices, stops <values>, error <px> px` line after the `CUSTOM` lines (the result's `customParts.bakes`: `part`, `param`, `vertices`, `stops`, `errorPx`), the written model having been landed through the engine, and a stop off by 0.1 px or more comes back as `INVALID: BAKE ERROR <part> <param>=<value>: …`, and a part the bake moves at rest as `INVALID: BAKE ERROR <part> at rest: …`, with nothing written (the rig and the engine disagree: report it as a bug in the packages). Whenever `customParts` was passed, the written model is also measured per custom part (the result's `customParts.gate`: `ok`, `limits`, `parts`, `failed`) and the text ends with its lines, `CUSTOM <id> FOLDS|T
| Parameter | Type | Description |
|---|
| bakes | object | Lattices that move the CUSTOM parts when a parameter does, which an unrigged custom part otherwise does not: `{ targets, meshes? }`; it needs `customParts` and names no other part. A target `{ id?, param, parts, box?, grid: { cols, rows }, stops, mirror?, why? }` is `(cols + 1) x (rows + 1)` control points laid evenly over `box` (canvas px; absent, the union of the parts' rest boxes grown by 2 px), listed row-major from the top-left; `stops` is `{ "<value>": [[dx, dy], … one per control point] }`. FRAME: every position and displacement is in canvas px, origin top-left, x right, y DOWN, the frame of the layer PNGs and of `describe_iki`'s boxes and `probe_rig`. A STOP is the part's TOTAL landed displacement from rest when `param` alone is at that value and every other parameter is at its default: the head's own carry is inside it, so a neighbour's displacement as `probe_rig` measures it is written as it is. Stop keys are values of `param` inside its range, never its default (rest is implicit). The landing is exact at rest, at each stop and at one end key at the range end on a side whose outermost stop is inside the range (it holds that stop's displacement); a side with no stop is not moved by the target. Between keys the offsets blend linearly, so under the head's roll (ParamAngleZ) the path bows off the line, about 1 px midway over 15°: put a stop where the path matters. Each vertex takes the bilinear value of the lattice at its REST position, and a vertex outside `box` takes the nearest edge's value. `mirror: true` fills a missing stop from the one at the value mirrored about the rest value, when that value is inside the parameter's range: the lattice reflected about the box's vertical centre line, `dx` negated; a stop you wrote is never overwritten. Targets that name the same part and parameter SUM; a part in targets on two parameters gets one warp per parameter, and the two add in the head's frame, so under a roll a sway tilts with the head. `meshes` re-meshes a custom part before the bake, `{ <id>: { rows: [canvas-px y, …], cols } }` (the first row at the part's top and the last at its bottom, within 0.5 px) or `{ <id>: { cellPx } }`; the rest picture is unchanged. The written model is then landed through the engine at every stop and at the range end each side holds its outermost stop to, and refused when one is off by 0.1 px or more. An input the rig refuses comes back as `INVALID: bakes…` (`bakes.targets[2].stops["30"][7]…`) and nothing is written; a field of the wrong type is refused by the schema itself, as the SDK's input validation error. A bake is measured on one rig: after a retune of the layout or `rigPlan`, a regenerated anchor, a changed custom layer or an accepted patch batch, measure the stops again. |
| customParts | array | The part's id: a plain identifier, not a role's name or a part id. |
| layers | array | Role-bearing filename; defaults to the basename of `path`. |
| outputPath | string | Output .iki path (resolved against cwd; parent dir must exist). |
| patches | array | Displacements ADDED to EXISTING keyform stops of the freshly generated rig, each op `{ target, at, region, by, falloff?, why? }`. They are replayed on every rig of these inputs, over whatever the rig now bakes, so they hold through a layout or `rigPlan` retune; ops on one stop add up, whatever their order. `target` is a feature grid — `eyeWarp_L`, `eyeWarp_R`, `browWarp_L`, `browWarp_R`, `noseWarp`, `mouthWarp`, whose `at` names both `ParamAngleX` and `ParamAngleY`, each -30, 0 or 30, never both 0 — or a mesh part with warps (`face`, `hair_front`, …), whose `at` names exactly one parameter at one of that part's warp keyform values, never the parameter's default nor the stop where the rig shuts the part on purpose (`eye_*` and `lash_lower_*` at their `ParamEye*Open` 0, the lip set and its tongue and teeth at `ParamMouthOpenY` 0), which the fold check exempts, nor a `ParamAngleZ` or `ParamBodyAngleZ` stop (they roll the deformers the part hangs under, so a displacement there is turned off the screen axes). The rest pose is the drawn art and no patch changes it. `bodyWarp` and the matrix deformers are not targets, and a patch adds no stop and changes no parameter range. `region` `{ role, x: [from, to], y: [from, to] }` is a rectangle in fractions of the REST layer box (the opaque crop) of `role`, origin top-left, x right, y DOWN, and may reach past the box: the target's points whose REST position lies inside take the whole of `by`, those within `falloff` of it a smooth share, the rest nothing. `by` `{ dx, dy }` and `falloff` are in face widths (the `face` layer's crop width), on screen axes: +dx toward the viewer's right (a character's `_L` side), +dy DOWN. Between stops the engine blends linearly, so a fix at ParamAngleX -30 shows at half strength at -15 and none at rest. `why` is a note the rig ignores. An op this schema accepts but the rig refuses — an unknown key, target, role or stop, the rest stop or a shut stop, a region running backwards or catching none of the target's points — comes back as `INVALID: patches[i]…`, listing the keys, targets, stops or roles there are, or where the target's points lie in the role's box, and nothing is written; a missing field or one of the wrong type is refused by the schema itself, as the SDK's input validation error. |
| quantizeColors | number | Palette-quantize the atlas PNG to this many colours (2..256). Flat-shaded art keeps its look at 256 and the model shrinks to about a quarter; omit for lossless. A `nose` layer stays lossless on a second atlas page of its own, since the palette rims a soft-shaded nose's feather; the nose's own lossless page adds a content-dependent amount, since splitting it off also changes how page 0 re-quantizes without it; the result's `atlasBytes` sums both pages. |
| rigPlan | object | Per-character tuning from the profile the rig defaults to, in three groups: `turn` (`amount`, `featureLead`, `eyeForeshorten`, `noseLead`: the last two turn only, the nod untouched, and fitted by `turnTargets.farEyeRatio` / `turnTargets.noseShift` when those are given, which the `RIGPLAN:` line then reports as overridden; `farEar`: how far the far ear's outer edge follows the face on the turn), `hair` (`follow`, `outlineFollow`, `sway`) and `eyes` (`blink`). `describe_rig_plan` lists every field's default, range, recommended span, step and poses. A value out of range, or a group or key not named there, comes back as `INVALID: rigPlan.<path> …`; an object left out or `{}` is the profile. The result reports what the rig built with as `rigPlan` and a `RIGPLAN:` line. |
| style | any | Removed in @ikijs/mcp 0.30.0: pass `rigPlan`. Any value here is refused with the field map. |
| turnTargets | object | What the head turn is fitted to, as `measure_turn_reference` reports it off a front/turned reference pair. `eyeShift` (and the optional `noseShift`/`mouthShift`) is how far that feature slides across the head at full turn, as a fraction of the head's half-width — a MAGNITUDE: the rig turns both ways, so the sign is ignored. `farEyeRatio` is the far/near eye width at full turn over that same ratio at rest, `silhouetteRatio` the head's half-width turned over at rest. The half-width the shifts are fractions of is measured off the layers themselves, so it is not an input. An omitted field leaves that part of the turn at the profile the rig defaults to. A passed `eyeShift` is fitted by the turn's amount and clamped to the room the art leaves the far eye — the face plate's edge, or the bangs' side strand over the far iris (the result's `turn.clamped` lists every clamped field, `turn.achieved` what the rig reaches, and `turn.strandOverlap` how much of a far iris the bangs still cover). A passed `silhouetteRatio` is clamped too, only on a face drawn without hair and with ear islands, where narrowing the head that far would no longer cover the far ear's slide. Any other passed target this layer set cannot reach comes back as `INVALID: …` naming the field and the attainable range, since it is a measurement rather than a preference. A field not named here is refused the same way. A pair that shows a custom part crossing the eye row reads a wider head than the rig fits to, since the rig measures the role layers alone: measure a pair drawn without the custom parts. |
compose_layers_from_partsComposes AI-generated part PNGs into canvas-aligned, role-named PNG layers on disk, ready for auto_rig_from_layers (the eyewhite split, alpha-trim/white-key, and placement pipeline the character-generation skill needs), with the same geometry report measure_layers returns standalone included inline. face, eyewhite, iris, brow, hair_front are required, with mouth.png — or the lip set's mouth_keyed.png (the open mouth, its inside painted flat #00FF00) + mouth_interior.png (the cavity, teeth and tongue alone), which the composer keys and splits into mouth_inner / lip_lower / lip_upper on one frame so auto_rig_from_layers folds the mouth open like the eyelid, the interior's light paint (luma 100 and over) written as mouth_tongue and mouth_teeth on the same frame, riding the opening's bottom and the upper line and clipped to the cavity (listed in `skipped` when the interior has none); the two routes cannot be mixed, one keyed file without the other is refused, and a key that fails (no green, green outside the opening, an outline not closed round it, more than one opening, no skin under the opening, an interior that is only lips, or one drawn opaque on a non-white or noisy ground) is refused naming the regeneration; with the lip set neither mouth nor mouth_open is written and preview.png shows the mouth closed, as the rig draws the rest pose. hair_back, body, mouth_open (legacy route only), blush (one blush.png makes the blush_L/blush_R pair), hair_side (one hair_side.png makes the hair_side_L/hair_side_R pair) and nose are optional — without a nose layer the head still turns on the rig's default profile, but it has no nose to lead the turn, and `auto_rig_from_layers` fits no turn to the art (`turnTargets` is inert, no `turn` report). The hair_side.png is the front side lock on the screen LEFT, hanging beside the ear with its root at the image's top: hair_side_R is as drawn and hair_side_L mirrored, both drawn over the face, brows and lashes and under hair_front, and without the file both are listed in `skipped`. One arm.png — the arm on the screen LEFT, drawn hanging with its shoulder at the top — makes both arms of a full body: arm_R takes it as drawn and arm_L mirrored. The arms are opt-in: without arm.png the compose is a bust's and `skipped` never lists them. arm.png needs body.png, and each arm is hung on the body's shoulder by default (see `layout`). One forearm_pose.png — the arm's forearm raised, on the screen LEFT, standing up from its elbow with the hand at the top — makes both pose forearms (forearm_pose_R as drawn, forearm_pose_L mirrored): each is scaled so its elbow end is as wide as its arm's elbow run and pinned on that arm's elbow (see `layout`), and it needs arm.png. With one, preview-pose.png shows the switch at 1 as the rig draws it (the hanging forearms hidden below the elbow, the pose forearms over everything) while preview.png stays the rest pose; without one it is removed. The inline report carries the full-body checks too: a body whose feet a tall canvas's bottom cuts off, an arm without a body, an arm whose shoulder cap does not reach under the torso's edge (with both readings — a neck, or shoulders over a wider garment — when its pivot row is much narrower than the body below it), and a pose forearm without its arm or off its arm's elbow in pivot, width or length. A nose whose dense core is a speck — under a quarter of its trimmed part's width or height, such as a lone nostril mark or highlight — is sized and placed whole, and the inline report warns of it. A light mark drawn detached above the eye white, such as a double-eyelid crease, is dropped from the sclera (the iris's clip); dark strokes there stay lash ink. The eyewhite's dark lower lid — its line and lashes — becomes lash_lower_L/lash_lower_R, drawn over the iris; a white with none writes none and lists them in `skipped`.
| Parameter | Type | Description |
|---|
| canvasHeight | number | The canvas's height in px: an even integer in 1100..4096, default 1100 (a square bust canvas; at 1100 every output is byte-identical to leaving it out). The width stays 1100. The canvas grows downward: every default and every override keeps its canvas px from the top-left, so the head lands where it does on a bust and a full body gets room below. An odd height is refused — model space is centred on the canvas, so it would put the head on a half pixel — and it is checked before any part decodes. |
| layout | object | Per-role override merged over the built-in defaults, keyed by role — hair_back, body, arm_L, arm_R, face, blush_L, blush_R, nose, mouth, mouth_open, mouth_inner, eye_L, eye_R, iris_L, iris_R, lash_L, lash_R, brow_L, brow_R, hair_side_L, hair_side_R, hair_front, forearm_pose_L, forearm_pose_R — e.g. `{ eye_L: { cx: 660 } }`. `w` is an integer in 1..1100 (the canvas width) and `h` in 1..canvasHeight; omit `h` to keep the part's own aspect, set it to stretch. The defaults of the face's features — blush, nose, mouth, mouth_open, mouth_inner, eyes, irises, lashes, brows, side locks — are proportions of the face: an override of face.cx, face.cy or face.w carries them with it (scaled by the width; face.h stretches the face alone), while a feature's own override names canvas px. The nose is sized and placed by its dense core (its pixels at alpha >= 128, the drawing inside a soft nose's feather), not its whole part: `w`/`h` size the core, `cx` centres it, and a set `cy` centres its rows. A nose whose core is a speck — under a quarter of the trimmed part's width or height, such as a lone nostril mark or highlight — is sized and placed whole instead, and the report warns of it. Its `cy` defaults to unset, which lands the core's bottom row (the tip) 0.66 of the way from the eye row down to the mouth's, so the nose follows a retuned eye or mouth row. eye_L/lash_L and eye_R/lash_R are cut from one eyewhite into one frame, so each pair must land on the same frame — a pair set to land apart is rejected. lash_lower_L/lash_lower_R are cut from it too and have no key: they land on their eye's frame. mouth_inner is the lip set's one frame (mouth_open's place by default; lip_lower, lip_upper, mouth_tongue and mouth_teeth have no key and land on it, so a retune moves them together), and with the lip set the nose's tip rule reads layout.mouth_inner.cy. arm_L/arm_R have no cx/cy/w defaults: an unset `w` is 0.4 of the placed body's width, and an unset `cx` or `cy` hangs the arm's shoulder pivot — the one auto_rig_from_layers turns it about — on the body box's shoulder corner on that axis: its left edge for arm_R, its right edge for arm_L, 0.12 of its height under its top. A set one centres the arm as for every other role. forearm_pose_L/forearm_pose_R have no cx/cy/w defaults either: an unset `w` scales the forearm so its elbow end (the shoulder rule run from its bottom) is as wide as the placed arm's elbow run, and an unset `cx` or `cy` pins that elbow end's pivot on the arm's elbow — the one auto_rig_from_layers hangs it from. |
| mirrorParts | array | Part files to flip left-right as they are read, e.g. `["eyewhite.png"]`. The composer reads eyewhite.png as the eye on the screen LEFT (lash wing at the image's left end, lash-free tear duct at its right), brow.png as the brow on the screen RIGHT (thick head at the image's left end, tail at its right), blush.png as the blush on the screen LEFT (outer end, toward the face's edge, at the image's left end, inner end at its right), hair_side.png as the front side lock on the screen LEFT (hanging, its root at the image's top), arm.png as the arm on the screen LEFT (the character's right, hanging, its shoulder at the image's top), and forearm_pose.png as the raised forearm on the screen LEFT (standing up from its elbow, the hand at the image's top, the thumb toward the body at the image's right); a part drawn the other way round is fixed here for free. It flips the source, so every role cut from it flips together and an eye's sclera and lash stay in one frame. |
| outDir * | string | Existing directory to write the role layer PNGs + preview.png (and preview-pose.png when there is a forearm_pose.png) into (resolved against cwd; must already exist; confined to the working directory). Reused across runs: a role this run does not write — one it skips, or an arm or pose forearm once arm.png or forearm_pose.png is gone, preview-pose.png included — has its stale PNG from an earlier run deleted. |
| partsDir * | string | Directory of the source part PNGs (resolved against cwd). |
cut_layers_from_illustrationCuts ONE finished front-facing character picture (PNG, JPEG or WebP) into in-place role layers for auto_rig_from_layers, from landmarks you read off `view_illustration_grid` (no ML: every part is found from your landmarks and colour samples). The picture is scaled to the 1100 px wide layer canvas (height by its aspect), the canvas `view_illustration_grid` shows; a transparent picture is used as is, an opaque one has its flat backdrop keyed from the border's colour (a border that is not one flat colour is refused). FRAME: canvas px, origin top-left, x right, y down; a coordinate names a pixel; `L` is the character's left, the viewer's right (but `mouth.cornerL` is the viewer's left end). Writes into `outputDir`, every layer a canvas-sized PNG with the paint where the picture has it: hair_back, body, face, nose, mouth, eye_L/eye_R (the sclera), iris_L/iris_R, lash_lower_L/lash_lower_R, lash_L/lash_R, brow_L/brow_R, hair_side_L/hair_side_R (a side lock per `sideHair` polygon holding hair) and hair_front (a feature that is not found writes no layer), each custom part as `custom/<id>.png` (never a role layer: pass them as auto_rig_from_layers' `customParts`, tied at their `tie`), and preview-labels.png (the labels over the picture) and preview-landmarks.png (the landmarks over it), which measure_layers skips. What a layer hides when the rig moves it (the forehead under the bangs, the hair behind the face, the neck behind the chin, the skin under each feature, the cheek and the back hair under a side lock, a side lock's root under the bangs) is filled from the paint around it. A role this cut does not write is removed from `outputDir` if an earlier run left it. With `mouthKeyed` + `mouthInterior` (the composer's lip-set inputs) the lip set is written instead of `mouth`: mouth_inner, lip_lower, lip_upper, and mouth_teeth / mouth_tongue when the interior has light paint, scaled uniformly so the set's own corners (its line's ends) are as far apart as `mouth.cornerL` and `mouth.cornerR` and centred on their midpoint, not turned; the drawn mouth still leaves the face. Text result: the written files one per line, then one line per check, `CHECK <id>: pass|WARN|FAIL <value> (limit <limit>) <hint>` (WARN a warn-level check that did not pass, FAIL a fail-level one; `none` for no value or no limit; the hint names the landmark to move), then measure_layers' checks on the written directory that a cut can act on, as `MEASURE:` lines: what auto_rig_from_layers refuses (a lip set partial, mixed with `mouth` or on another canvas, the lip layers' opening unreadable, a lash whose top row is off its sclera's), a missing optional role (body, hair_back, nose), the side locks' checks naming the landmark to move (a lock without hair_front, a root showing past the bangs, the strip its lean on the turn bares with nothing painted behind), and with a lip set its opening's facts (`lips: opening …`); the checks whose only remedy is re-laying-out or regenerating a generated part (art edges and straight cuts, eye aspect, iris size and place, an eyewhite to mirror, a speck nose, the lip set's own art, a hair_side.png drawing two locks, and a side lock over its eye's corner, which the cut checks against the declared eye box) are left out, the parts being as drawn; and last `CUT pass` or `CUT FAIL: <failed check ids>`. The checks: `stack` (fail): the layers stacked in role order against the picture, the share of canvas pixels off by more than 24 levels outside the mouth's box, limit 0.003, the box's own share counted apart since the mouth is replaced; `seeds` (fail): seeds and samples on the backdrop or on the wrong class, limit 0; `opening.L|R` (fail when the eye box clips the drawn eye, saying how far to grow it to leave 2 to 4 px to spare; warn when the paint the box cuts runs on past it as a stroke it cannot tell from a lash wing, saying what it sees, or when the eye covers under 0.2 of a loose box; a stroke crossing into the box apart from the eye is left out
| Parameter | Type | Description |
|---|
| imagePath * | string | The finished picture (PNG, JPEG or WebP; resolved against cwd). |
| landmarks | object | Required. `{ hair: { base, shadow?, highlight? }, skin: { base, shadow? } }`, each a list of PTS (base 1 or more): points on flat patches of each tone. A pixel is hair or skin by which set it is nearer in colour; a sample on a line or on the other class's paint moves that paint across the whole picture. At most 32 points per class. |
| mouthInterior | string | The lip set's cavity, teeth and tongue alone (the composer's mouth_interior.png; resolved against cwd). Needs `mouthKeyed`. |
| mouthKeyed | string | The lip set's open mouth, its inside painted flat #00FF00 (the composer's mouth_keyed.png; resolved against cwd). Needs `mouthInterior`. |
| outputDir * | string | Existing directory to write the layers into (resolved against cwd; confined to the working directory). Reused across rounds: same-named files are overwritten. |
view_illustration_gridWrites a PNG of one finished character picture (PNG, JPEG or WebP) for reading coordinates off it: the picture scaled to the 1100 px wide layer canvas (height by its aspect, Lanczos), the same canvas the in-place cut works on, cropped, zoomed by an integer factor nearest-neighbour so the pixels stay readable, with a grid line every `step` canvas px labelled along the top and left edges. FRAME: canvas px, origin top-left, x right, y down; a line labelled v sits on the left (top) edge of canvas pixel v, and a landmark coordinate v names that pixel, drawn through its centre. A picture is turned upright by its EXIF orientation first. The picture is shown as given, its backdrop included; only real transparency shows the view's green. With `landmarks`, each shape in it is drawn over the picture, in its key's colour between a dark and a light stroke so it reads over any paint, and labelled with its key path (`eyes.L.iris`, `skinSeeds[2]`): a 4-number array is a box `[x0, y0, x1, y1]`, `{ cx, cy, rx, ry }` an ellipse, a list of `[x, y]` a polyline (closed under `frontHair`, `skull`, `polygon`, `bodyOnly` and `sideHair`), a lone `[x, y]` or a list under a key ending in `Seeds` or anywhere under `samples` point markers; anything else is walked into or skipped, never refused. Defaults: the whole canvas, zoom 1, step 50. Returns the written path, the crop used (whole pixels, clamped to the canvas), zoom, step and the canvas size. A zoom outside 1..8 or not an integer, a step under 5 or not an integer, a crop with no size or missing the canvas, a view over 16,777,216 px, an output path not ending in `.png` or outside the working directory (its folder must exist), a missing, unsupported or corrupt picture, or one over 16,777,216 px or whose canvas would be over 4096 px tall comes back as `INVALID: …` and nothing is written.
| Parameter | Type | Description |
|---|
| crop | object | The rectangle to show, in canvas px; clamped to the canvas. The whole canvas when omitted. |
| imagePath * | string | The picture (PNG, JPEG or WebP; resolved against cwd). |
| landmarks | object | Shapes to draw over the picture, by shape (see the description); unknown shapes are skipped. |
| outputPath * | string | A `.png` path (resolved against cwd, under it; its folder must exist). Overwritten if present. |
| step | number | Grid spacing in canvas px, an integer of at least 5; 50 when omitted. |
| zoom | number | Output px per canvas px, an integer 1..8; 1 when omitted. |
1 check has not been run yet.