/0x55

⬛️ Image editor for 5x5 binary sprites

Primary LanguageJavaScript

0x55 is an image editor for 5x5 binary sprites.

The pixels of the images are encoded as bits in row-major order. This makes them ideal for embedding directly into source code for emulators, games, and retro user interfaces.

Unlike conventional images, you'll need to write some code to render these sprites.

let sprite = 0x7FF8FEBF;

for (let y = 0; y < 5; y++) {
  for (let x = 0; x < 5; x++) {
    let bit = 1 & (sprite >> x + y * 5);
    setPixel(x, y, bit);
  }
}

For a canvas setPixel could call ctx.fillRect, or perhaps set pixels directly on imageData.