Metadata-Version: 2.5
Name: excel-photo
Version: 0.1.0
Summary: Convert images into pixel art rendered as colored Excel cells
Project-URL: Homepage, https://github.com/notsajeed/excel-photo
Author-email: sajeed <mohammedsajeed200510@gmail.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.9
Requires-Dist: openpyxl>=3.1
Requires-Dist: pillow>=10.0
Description-Content-Type: text/markdown

# excel-photo

Convert any image into an `.xlsx` file where the image is recreated using
colored Excel cells - pixel art, but it's a spreadsheet.

## Install

```bash
pip install excel-photo
```

## Usage

### CLI

```bash
excel-photo input.png output.xlsx --max-dim 300 --max-colors 256
```

### Python

```python
from excel_photo import image_to_excel

result = image_to_excel("input.png", "output.xlsx", max_dim=300, max_colors=256)
print(result)  # {'grid_width': 300, 'grid_height': 168, 'unique_colors': 249}
```

## Options

| Option       | Default | What it does                                                                                                                              |
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `max_dim`    | 100     | Longer side of the grid, in cells. This is the resolution knob.                                                                           |
| `max_colors` | 256     | Palette size (1-256). Keeps unique cell styles bounded regardless of `max_dim` - Excel hard-caps a workbook at 64,000 unique cell styles. |

## Notes

- 300-400 for `max_dim` is a sweet spot: a real quality jump, still opens
  smoothly in Excel. Beyond ~500-600 Excel starts feeling sluggish just from
  rendering that many individually-styled cells, even though the file itself
  stays small.
- Unused columns past the image are hidden so scrolling right stops cleanly.
  Rows aren't hidden the same way - Excel has no bulk-range mechanism for
  hiding rows, so doing this for the ~1M rows below the image would balloon
  the file instead of shrinking it.

## License

MIT
