Skip to main content
Builtins catalog / nika:image_fx

Media

Tool family from the canonical registry.

invoke

Call this builtin through the invoke verb.

Read this contract

This reference preserves the specification at the revision linked below. Source examples are fragments: their surrounding tasks, inputs and permissions are not supplied here. Consult engine status and nika catalog --tools --json for the installed implementation; a registry declaration is not a runtime qualification.

Usage and behavior

illustration
The §Media graduate #3 (the image editing deferred row) — the DETERMINISTIC sibling of image_generate: pure pixel transform, NO provider, NO network, NO clock. Byte-identical output forever for identical (input bytes, args) — the artifact’s sha256 joins the hash-chained trace, re-render IS the tamper check, and the full recipe (contract tag image_fx/v1 · input sha256 · seed · ops) rides the artifact itself as a PNG nika tEXt chunk (no timestamp — determinism holds). Identical bytes already at out: = idempotent skip (skipped_existing). Per-op defaults + acceptance ranges (NORMATIVE — for a byte-deterministic builtin the defaults ARE the wire contract; a second engine choosing other defaults emits different bytes for the same YAML) · Input caps (normative) · per-dimension ≤16384 · decoded pixels ≤2^26 (gated from the header BEFORE any decompression · -005). Output · { input, input_sha256, path, sha256, size_bytes, width, height, format, ops_applied, seed, skipped_existing } — artifact bytes NEVER ride outputs (the disk law, inherited verbatim). Text artifacts (ascii text/ansi emits) report width/height 0 and format txt/ans. Determinism contract (normative) · no wall-clock · no randomness beyond the seeded stream · no float transcendentals · integer/fixed-point pixel math · identical (input, args) MUST produce byte-identical artifacts across platforms and releases within a stdlib major (the recipe carries the stable contract tag image_fx/v1, never the engine build). An engine that cannot honor this is not conformant (07-conformance §3). Throws · NIKA-BUILTIN-IMAGE_FX-001 invalid arguments (unknown op · out-of-range param · extension mismatch · validation_error) · -002 input read failed (tool_error) · -003 unsupported input format (non-PNG · exotic depth/interlace · validation_error) · -004 decode failed (structural corruption · CRC/Adler mismatch · tool_error) · -005 decoded-pixel budget exceeded (security_error · never transient) · -006 artifact save failed (tool_error). Plus the boundary NIKA-SEC-004 (paths outside permits.fs).

Arguments

Pass the values required by the tool contract.

Permissions

Understand authority before granting effects.

Errors and recovery

Read diagnostics and choose a recovery policy.

Workflow templates

Put the fragment inside a complete workflow.

Contract provenance

Read the pinned specification · Canonical registry. Tool identity: nika:image_fx. Specification revision: f8c5df2127c7. The Lab language identity is language:tool:image_fx; the registry view is ecosystem:tool/nika:image_fx. They refer to this contract without merging their graph identities.