Metadata-Version: 2.4
Name: mp32png
Version: 1.0.0
Summary: Pack MP3 files into PNG images and extract them back
Author: Denis Varga
License-Expression: MIT
Project-URL: Homepage, https://github.com/DenisVarga/mp32png
Project-URL: Repository, https://github.com/DenisVarga/mp32png
Keywords: mp3,png,steganography,audio,pack
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=9.0
Dynamic: license-file

# mp32png

Pack MP3 files into PNG images and extract them back — with bit-identical guarantees.

## Install

```bash
git clone <repository>
cd mp32png
pip install .
```

## Usage

```bash
mp32png pack song.mp3 song.png
mp32png pack song.mp3 song.png --cover
mp32png pack song.mp3 song.png --cover cover.jpg

mp32png extract song.png song.mp3
mp32png extract song.png

mp32png verify song.png

mp32png hash song.mp3
mp32png hash song.png
```

## Commands

| Command | Description |
|---------|-------------|
| `pack` | Pack MP3 into PNG |
| `extract` | Extract MP3 from PNG |
| `verify` | Verify PNG container integrity |
| `hash` | Calculate SHA-256 hash |

## How It Works

The MP3 binary data is stored in custom PNG ancillary chunks (`dMP3`).
The visible PNG image is a cover — either extracted from the MP3's ID3 tags,
provided explicitly, or auto-generated.

Data is split into 1 MiB chunks. Each container stores:
- Magic bytes (`MP3PNG`)
- Format version
- Original filename
- MIME type
- File size
- SHA-256 checksum
- MP3 binary data

## Bit-Identical Extraction

```bash
mp32png pack original.mp3 packed.png
mp32png extract packed.png restored.mp3
sha256sum original.mp3 restored.mp3
```

Both hashes will match exactly.

## License

MIT
