Metadata-Version: 2.4
Name: pictoiso
Version: 1.0.0
Summary: Scales images to standard ISO card dimensions with blurred margins, customizable millimeter padding, and PNG output.
Author-email: buma <bumadev@mailbox.org>
License: Creative Commons Attribution-NonCommercial 4.0 International Public License
        
        By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License").
        
        Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
        1. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
        2. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
        
        NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation.
        
        For the full legal code, please visit: https://creativecommons.org
        
Project-URL: Homepage, https://codeberg.org/buma/pictoiso.git
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: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0.0
Dynamic: license-file

# pictoiso

A Python CLI tool and library to symmetrically upscale, style, and fit images into the standard **ISO/IEC 7810 ID-1 card dimensions (85.60mm × 53.98mm)**. Perfect for creating uniform printable card labels, badges, or templates.

## Features

- **Blurred Canvas:** Scales the image to fill the background completely and applies a smooth blur filter.
- **Symmetric Centering:** Fits the foreground cleanly over the center without distortion.
- **Lossless Export:** Always outputs high-quality PNGs with embedded DPI metadata.
- **Inner Image Margin:** Symmetrically shrinks the foreground image by a custom millimeter value, exposing more of the blurred background around the edges.
- **Batch Processing:** Point the tool at a folder to convert all images automatically.

## Installation

```bash
pip install pictoiso
```

## CLI Usage

### Single Image Conversion (with 4mm inner padding margin)
```bash
pictoiso photo.jpg -o output_card.png --dpi 600 --border 4.0
```

### Batch Directory Conversion
```bash
pictoiso ./my_photos --blur 25
```

## Arguments
- `input`: Path to input file or folder.
- `-o, --output`: Target destination (file path or folder path).
- `-b, --blur`: Background blur radius (default: 15).
- `--dpi`: Target pixel density (300 or 600).
- `--border`: Foreground inner padding margin in millimeters (default: 1.8).

## License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). It is strictly free for personal and non-commercial use. Commercial use is prohibited.
