# Icon Forge

Icon Forge is PentaSec Solutions LLC free software for converting PNG, JPG, JPEG, WEBP, and BMP images into multi-size `.ico` files.

## Features

- Drag and drop or browse for an input image
- Large source-image preview
- Small previews for 16x16, 24x24, 32x32, 48x48, 64x64, 128x128, and 256x256
- Checkbox selection for icon sizes
- Single multi-size ICO or separate ICO files export modes
- Square crop or fit-with-padding resize modes
- Transparent background or custom background color
- Warnings for non-square images and images smaller than 256x256
- Multi-size `.ico` creation with Pillow
- PyInstaller command helper for packaging your own apps

## Install

```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
```

## Run

```powershell
python main.py
```

## Package As A Windows EXE

After testing the app locally, create a standalone Windows executable with the included `app.ico`:

```powershell
pyinstaller --onefile --windowed --name IconForge --icon=app.ico --add-data "app.ico;." main.py
```

The `--icon=app.ico` option sets the Windows executable icon. The `--add-data "app.ico;."` option also bundles the icon so the app window can use it at runtime.

The executable will be created in the `dist` folder.

## Building a Shareable Windows App

Run:

```powershell
.\build_release.bat
```

The finished EXE will be copied to:

```text
release\Icon Forge
```

If ZIP creation succeeds, the shareable ZIP will be created at:

```text
release\Icon Forge.zip
```

## PyInstaller Helper Command

The app displays this packaging command:

```powershell
pyinstaller --onefile --windowed --name IconForge --icon=app.ico --add-data "app.ico;." main.py
```

For packaging another Python app with an icon, use the same pattern:

```powershell
pyinstaller --onefile --windowed --icon=app.ico your_app.py
```
