Encode an image as an imgoji codec string (BFOS-pruned blended quadtree).
the image (cover-fit to 256²).
Optionalopts: {Optionalalpha?: numberper-layer blend weight (must match the viewer's alpha).
Optionalbilateral?: numberedge-preserving smoothing sigmaR applied to the match target.
OptionalbyteTarget?: numberdeflated-byte budget; the prune threshold is binary-searched to hit it.
Optionalcompare?: numbercomparison/match resolution.
Optionaldepth?: numbermax quadtree depth (8 = one pixel per cell at 256²).
OptionaldetailGate?: numberSobel gate; cells below it stay leaves.
Optionalmetric?: "cielab" | "oklab"matcher color space.
Optionalseed?: stringDSL seed string (base-layer sprites / anchor pins).
OptionalskipBias?: numberpaint-vs-background-skip bias.
Optionalthreshold?: numberfixed prune threshold (0..150) overriding byteTarget; lambda = 10^(threshold/25).
Flatten the image into a grid of opaque emoji (one per cell) for terminals / chat, with optional semantic overrides. No quadtree.
the image.
Optionalopts: {Optionalblank?: "dark" | "light"blank the matching background anchor to a space.
Optionalboost?: Function(x0,y0,x1,y1) => Map<emoji, 0..1> semantic distance per cell.
Optionalcols?: numbercolumns.
Optionallambda?: numbercolor/semantic blend weight (0 = color only).
Optionalrows?: numberrows (rows = cols / line-height for square paste).
Encodes an image as an imgoji codec string: grows a breadth-first quadtree, selects/blends a glyph per cell, prunes by BFOS cost-complexity to a byte budget, and emits a position-implicit RLE-compressed string. Heavy: builds a glyph atlas and matches per cell. The display-only
Rendererdoes not import this.