pixel-sprite-maker: spritec - .sprite text format -> png/jpg/svg + sprite sheets

- .sprite format: single-char palette keys (hex/rgb()/CSS names/none), grid
  rows, '.' transparent by default, max 256x256 per sprite
- render/sheet/info/preview subcommands; sheets name themselves
  <base>_<cellW>x<cellH>_<cols>x<rows>.<ext> (row-major)
- SVG output RLE-merges pixel runs; JPG composites over --bg
- go tests for parser, colors, scaling, svg, sheet layout

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmdG9GqfSWCzts7AkDwRDh
This commit is contained in:
2026-07-14 02:21:57 +02:00
parent 581e37acd8
commit 23135a96d1
21 changed files with 1444 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 8 8" shape-rendering="crispEdges">
<rect x="2" y="0" width="4" height="1" fill="#1a1205"/>
<rect x="1" y="1" width="1" height="1" fill="#1a1205"/>
<rect x="2" y="1" width="3" height="1" fill="#ffd700"/>
<rect x="5" y="1" width="1" height="1" fill="#fff3a0"/>
<rect x="6" y="1" width="1" height="1" fill="#1a1205"/>
<rect x="0" y="2" width="1" height="1" fill="#1a1205"/>
<rect x="1" y="2" width="3" height="1" fill="#ffd700"/>
<rect x="4" y="2" width="2" height="1" fill="#fff3a0"/>
<rect x="6" y="2" width="1" height="1" fill="#b8860b"/>
<rect x="7" y="2" width="1" height="1" fill="#1a1205"/>
<rect x="0" y="3" width="1" height="1" fill="#1a1205"/>
<rect x="1" y="3" width="2" height="1" fill="#ffd700"/>
<rect x="3" y="3" width="1" height="1" fill="#fff3a0"/>
<rect x="4" y="3" width="2" height="1" fill="#ffd700"/>
<rect x="6" y="3" width="1" height="1" fill="#b8860b"/>
<rect x="7" y="3" width="1" height="1" fill="#1a1205"/>
<rect x="0" y="4" width="1" height="1" fill="#1a1205"/>
<rect x="1" y="4" width="1" height="1" fill="#ffd700"/>
<rect x="2" y="4" width="1" height="1" fill="#fff3a0"/>
<rect x="3" y="4" width="3" height="1" fill="#ffd700"/>
<rect x="6" y="4" width="1" height="1" fill="#b8860b"/>
<rect x="7" y="4" width="1" height="1" fill="#1a1205"/>
<rect x="0" y="5" width="1" height="1" fill="#1a1205"/>
<rect x="1" y="5" width="1" height="1" fill="#fff3a0"/>
<rect x="2" y="5" width="3" height="1" fill="#ffd700"/>
<rect x="5" y="5" width="2" height="1" fill="#b8860b"/>
<rect x="7" y="5" width="1" height="1" fill="#1a1205"/>
<rect x="1" y="6" width="1" height="1" fill="#1a1205"/>
<rect x="2" y="6" width="1" height="1" fill="#ffd700"/>
<rect x="3" y="6" width="3" height="1" fill="#b8860b"/>
<rect x="6" y="6" width="1" height="1" fill="#1a1205"/>
<rect x="2" y="7" width="4" height="1" fill="#1a1205"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB