Convert PNG images to HolyC data structures for drawing in TempleOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

868 B

PNG Requirements

General: PNG must be saved in indexed mode.

GIMP: Import the .gpl as your palette and enable alpha layer. Functionally pixels with transparency will become indexed to #0.

Aseprite: Import the .png as your palette, the magenta in slot #0 will be treated as transparent while in indexed mode by default.

Note: The colors of your palette don't actually matter, we only care about the index number. Below is the default colors and how they're converted.

Conversion Chart

  • TRANSPARENT 0 -> 0xFF
  • BLACK 1 -> 0
  • BLUE 2 -> 1
  • GREEN 3 -> 2
  • CYAN 4 -> 3
  • RED 5 -> 4
  • PURPLE 6 -> 5
  • BROWN 7 -> 6
  • LTGRAY 8 -> 7
  • DKGRAY 9 -> 8
  • LTBLUE 10 -> 9
  • LTGREEN 11 -> 10
  • LTCYAN 12 -> 11
  • LTRED 13 -> 12
  • LTPURPLE 14 -> 13
  • YELLOW 15 -> 14
  • WHITE 16 -> 15