Skip to main content

Module portable

Module portable 

Source
Expand description

Platform-independent, in-memory PNG optimization and image scoring. In-memory operations shared by the native CLI and browser adapters. No filesystem, processes, sockets, or platform image framework is used here.

Structs§

OptimizedPng
PngSummary

Constants§

WEB_MAX_INPUT_BYTES
WEB_MAX_PIXELS

Functions§

optimize_png
Optimize a static PNG within the browser’s conservative per-image budget. Returns the original bytes when no smaller encoding is found.
score_srgb_rgba
Score caller-supplied straight-alpha, 8-bit sRGB RGBA buffers (ImageData). Callers must normalize image color profiles to sRGB before using this API.