# Pixelify

> A web app that turns images into pixel art. It offers dithering algorithms, adjustable color depth, and a REST API.

A web application that converts images into pixel art. It supports [Floyd-Steinberg](https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering) and Bayer dithering, two methods that simulate more colors with patterns of dots. You can adjust color depth from 4 to 256 colors, control pixel size, and tune brightness, contrast, and saturation.

Processing runs on both sides. The client side gives a real-time preview through the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API). The server side runs through a REST API.

## Features

- Real-time preview: You see changes instantly as you adjust settings.
- Multiple dithering algorithms: Floyd-Steinberg and Bayer give different aesthetic effects.
- Adjustable color depth: You can choose from 4 to 256 colors for different retro styles.
- REST API: You can add pixel art generation to your own applications.

## Use cases

- Create retro-style game assets.
- Generate pixel art avatars and icons.
- Add dithering effects to photographs.
- Build custom pixel art with precise control.

## API

```bash
curl -X POST https://pixelify.fasu.dev/api/pixelart \
  -H "Content-Type: application/json" \
  -d '{
    "image": "data:image/png;base64,...",
    "pixelSize": 8,
    "colorDepth": 32,
    "dithering": "floyd-steinberg"
  }'
```

## Getting started

1. Go to [pixelify.fasu.dev](https://pixelify.fasu.dev).
2. Upload an image, or drag and drop it.
3. Adjust pixel size, color depth, and dithering settings.
4. Download your pixel art, or use the API for batch processing.
