SkillAgentSearch skills...

0x55

⬛️ Image editor for 5x5 binary sprites

Install / Use

/learn @danprince/0x55
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<img width="32" src="/favicon.svg" />

<strong>0x55</strong> 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.

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1y ago
Forks0

Languages

JavaScript

Security Score

60/100

Audited on Dec 3, 2024

No findings