/** * PNG downscaling with Node built-ins only (node:zlib), for device screenshots. * * Why this exists: `screencap` returns the panel's native resolution (a Pixel 6 is * 1080×2340), and vision APIs downscale anything whose long side exceeds ~1568px * BEFORE the model sees it. The model then answers with coordinates in the image it * saw — a frame nobody on our side knows — so taps land wherever the silent resize * put them. Scaling on our side keeps the coordinate space known: the driver records * the factor and maps the model's points back to device pixels. * * Scope is deliberately narrow: 8-bit RGB/RGBA, non-interlaced — what `screencap -p` * emits. Anything else (or a parse failure) falls back to the original bytes with * scale 1, which is exactly the old behavior. */ export interface ScaledPng { png: Buffer; /** Device pixels per image pixel (≥ 1). Multiply image coordinates by this. */ toSource: number; width: number; height: number; } /** Downscale so the long side is ≤ maxLongSide; pass small images through untouched. */ export declare function scalePngToLongSide(png: Buffer, maxLongSide: number): ScaledPng;