Jump to content
IGNORED

bB pngParse - png to table parser


Cybearg

Recommended Posts

For anyone interested, I've made a little command line tool called pngParse that reads a palette png image and a sprite png image and outputs sprite table data formatted for batariBasic or 6502 ASM.

bBpP_1.0.0.zip

 

Notes on use:

pngParse doesn't approximate colors: it identifies colors between the sprite image and the palette image by comparing r/g/b values, so for your sprite image to accurately be parsed, its colors must exactly match the colors in the palette.

 

pngParse can take custom palettes of 8x16 pixels. Palettes for NTSC and PAL are already included in the attached zip file. if you don't specify a custom palette file, pngParse will expect to find ntsc.png or pal.png (depending on the -P flag) in the same directory. Output will go to output.txt by default.

 

Sprite images must have a width divisible by 8. Sprite images wider than 8 pixels will be parsed as a separate sprite, so you can input a 64x13 pixel sprite sheet and pngParse will output 8 8x13 pixel sprites.

 

Flags:

-s "spritesheet.png"

Specifies the input spritesheet (required).

-p "secam.png"

Specifies the input palette image (ignores the -P flag)

-o "spriteData.txt"

Specifies the output file (output.txt by default)

-P

Uses the PAL palette (NTSC by default)

-D

Formats output for the DPC kernel (standard kernel formatting by default)

-A

Formats output for 6502 ASM (batariBasic formatting by default)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...