CLI reference › PixelLab utilities

unzoom

pixelkiln unzoom --from refs/knight-512.png --out refs/knight.png

Shrinks an upscaled piece of pixel art (a 32x32 sprite saved at 512x512, every art pixel a 16x16 block) back onto its native grid with PixelLab's /unzoom. Run it on outside art before listing it in styleImages or as a reference: PixelLab's own API guide names upscaled reference art as the most common cause of disappointing output from every endpoint that takes one.

  • --out defaults to <input>.unzoomed.png beside the input, and the input is never overwritten. An existing --out is replaced only with --force.
  • --quantize <n>: 0 (default) auto-detects a palette, -1 keeps every color the downsample produces, 2-256 quantizes to exactly that many.
  • The input must be at least 256x256 (the grid detector needs room) and at most 2048x2048 worth of pixels; both are checked before anything is sent.
  • The result is opaque: PixelLab composites transparency onto white before it detects the grid, so a cut-out sprite needs its background removed again.
  • --json prints the detected zoom factor and both sizes; --dry-run sends nothing.