https://github.com/danprince/0x55
⬛️ Image editor for 5x5 binary sprites
https://github.com/danprince/0x55
binary image-editor sprites tools
Last synced: 8 months ago
JSON representation
⬛️ Image editor for 5x5 binary sprites
- Host: GitHub
- URL: https://github.com/danprince/0x55
- Owner: danprince
- Created: 2022-07-06T20:32:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-10T07:01:30.000Z (almost 4 years ago)
- Last Synced: 2024-12-05T19:14:54.543Z (over 1 year ago)
- Topics: binary, image-editor, sprites, tools
- Language: JavaScript
- Homepage: https://0x55.netlify.app
- Size: 30.3 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

[0x55](https://0x55.netlify.app) is an image editor for 5x5 binary sprites.
The pixels of the images are encoded as bits in [row-major order](https://en.wikipedia.org/wiki/Row-_and_column-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.
```ts
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`.