pxart help CONVERTING

Converting

CONVERTING
  export FILE|DIR[:SEL]... [--frames DIR] [--aseprite sheet.json] [--tiled tiles.tsj] [--variant V]
         [--prefix-file] [--exclude GLOB] [--indexed X.json]
      --frames: one PNG per frame at DIR/<frame id>.png, and DIR/pivots.json when frames have
        pivots: {"walk/0": {"x": 8, "y": 23}, ...} (frames without one are left out)
      --aseprite: sheet PNG + Aseprite-style JSON (frames, durations, frameTags; pivots as
        Aseprite writes them: meta.slices = one slice "pivot" with a key per frame index,
        {"frame": N, "bounds": {"x": 0, "y": 0, "w": W, "h": H}, "pivot": {"x": X, "y": Y}},
        bounds = the whole frame, pivot relative to it, "pivot" left out for a frame without)
      --tiled: sheet PNG + Tiled tileset JSON with per-tile animations (worlds: help worlds)
      (--aseprite x.json and --tiled x.tsj write the same x.png)
      FILE:SEL exports only those frames; several selectors of one file add up, in file
      order: 'export harbor.px:cobble harbor.px:water --tiled t.tsj' (no 32x32 props).
      Several files and directories export together, file by file in the order named; a
      directory stands for every .px under it (palette files skipped, --exclude as for
      sheet): 'export town/ --frames out/'. No two frames may get one name: an id two files
      share (each file's idle/0; two animations of one name too), or, with --frames, two ids
      that differ only in case (Door, door: one file on macOS), is E_DUP_FRAME, and nothing
      is written. --prefix-file ids them FILE/ID, FILE being the file's path under its
      directory without .px, or a named file's stem (roofs/roof-red, props/well/well; an
      unnamed grid is FILE alone), in the PNG paths, the Aseprite filenames and tags and the
      Tiled animations.
      Id order (the Aseprite frame index, the Tiled tile id, the sheet position): 0, 1, 2...
      over the exported frames, file by file, with each animation group contiguous, groups
      in order of first appearance, and all top-level frames (no '/' in the id) together as
      one group where the first of them appears. A file that keeps each group together, and
      its top-level frames together, gets ids in file order; otherwise a frame moves up to
      its group: a/0 b/0 a/1 -> a/0=0 a/1=1 b/0=2, and icon walk/0 badge -> icon=0 badge=1
      walk/0=2. Adding, removing or moving frames can renumber others, and a Tiled map
      painted with the old tileset keeps the old ids.
  from-png A.png [B.png ...] [-o OUT.px] [--id PREFIX] [--prefix-dir] [--palette P.px] [--colors N]
           [--hard-edges] [--names A,B,... | --labels FILE.csv [--label-col proposed_name] [--file-col filename]]
  from-png SHEET.png --grid WxH [--names A,B,...] [--by rows|cols] [-o OUT.px] [--id PREFIX] [--palette P.px]
           [--colors N] [--hard-edges]
      PNG -> .px with exact pixels. One PNG and no --id: a single unnamed grid. Several PNGs,
      --id, or an existing OUT: frames named PREFIX/<png stem>, added to OUT (replacing same-id
      frames, which the 'wrote' line names). Two PNGs of one run that would get one id (two packs'
      tile_0002.png) are E_DUP_FRAME, naming both: --prefix-dir ids each one FOLDER/STEM by its
      directory's name (dungeon/tile_0002, creatures/tile_0002). Colors already in OUT keep their
      keys, so separate runs share one palette. --palette P.px starts a new OUT that imports P and
      reuses its keys.
      Naming loose PNGs: --names A,B,... gives one frame id per PNG, in order (as many names as
      PNGs; '' skips one). --labels FILE.csv names them from a CSV, the way packs ship one
      ('filename,proposed_name,...'): each PNG takes the --label-col (default proposed_name) of
      the row whose --file-col (default filename) names it, a path relative to the CSV's
      directory, or else its file name alone. --labels repeats, one CSV per pack (with
      --prefix-dir: dungeon/wall-stone-top, creatures/skeleton). A PNG no row names is E_SELECT.
      --prefix-dir and --id PREFIX go in front of either.
      --grid 16x16 slices one sheet into 16x16 cells, a frame each; a cell with no opaque pixel is
      skipped. Each row of cells is a group (--by cols: each column), its cells left to right (top
      to bottom) frames 0, 1, ...: --names names the groups in turn (an empty name skips its row),
      else they are STEM/row0, STEM/row1 (col0, ...); --id PREFIX goes in front. A pack whose
      columns are directions and rows are steps: 'from-png Walk.png --grid 16x16 --by cols --names
      walk/down,walk/up,walk/left,walk/right -o boy.px' writes walk/down/0-3 and so on. A sheet
      that isn't a whole number of cells is E_BAD_ARG, unless the strip left over is empty (then a
      note says so).
      Too many colors (a photo)? --colors N reduces them to OUT's colors and at most N new ones;
      says how far. --hard-edges first: alpha 128+ opaque, the rest clear.
This page is built from site/src/data/reference.json in the repository.Edit on GitHub