One image in. A complete icon export folder out.
A small Python desktop app that turns your artwork into 14 PNG sizes and a Windows ICO, with optional ZIP packaging.
Quick start · Real examples · All export sizes · Python usage
IconResizer is the repository name; the desktop window is called IconCreator. The current interface is in German, and this guide explains the controls in English. Screenshot captured from the running Python application on Windows.
Choose a source image, pick an output folder, and click Icons generieren. Icon Creator prepares the same set of consistently named files every time, so you can drop them into your app's asset folder without resizing each one by hand.
- 14 PNG exports, from 30 × 30 to 512 × 512 pixels, including named Windows logo assets.
- One Windows ICO containing a single 128 × 128 image.
- Optional ZIP packaging alongside the export folder; enabled by default.
- Centered square cropping for rectangular source images, followed by Lanczos resizing.
- Transparency preserved when the source has an alpha channel.
- Local processing with Pillow and a resizable Tkinter/ttk interface.
The application processes files on your computer. It does not upload your images or require an account.
This demonstration uses the existing assets/icons/icon.png, passed through the application's actual generate_icons() function. The six output previews are placed at their native pixel sizes; the source preview is scaled down to fit. The checkerboard makes transparency visible and is not part of the exported images.
These are actual exports and an actual application screenshot, not AI-generated mockups.
Reproduce the export demonstration after installing the requirements:
python scripts/generate_demo.pyThe script creates all 15 files in exports/demo-icons/, checks their dimensions and formats, and rebuilds docs/images/export-demo.png from those files.
- Python 3.10 or newer with Tkinter available.
- Pillow, installed using the included
requirements.txt.
The application and export demonstration have been verified on Windows with Python 3.13 and Pillow 12.0.0. Other desktop platforms require a working Tk installation and have not been verified here.
git clone https://github.com/CodeCoderCodingCode/IconResizer.git
cd IconResizer
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe main.pyUsing the environment's Python directly means you do not need to activate it or change your PowerShell execution policy.
With Python and Tkinter installed:
git clone https://github.com/CodeCoderCodingCode/IconResizer.git
cd IconResizer
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python main.pyKeep the assets/ directory next to main.py to retain the bundled background and window icon.
- Under Eingabebild (input image), click Durchsuchen... (browse) and select your artwork. The picker lists PNG, JPG/JPEG, BMP, and GIF files.
- Under Basis-Ausgabe-Ordner, choose the base output directory. The default is
exports/next tomain.py. - Set Ordnername to the subfolder name you want, such as
my-app. - Leave Ordner nach dem Erzeugen als ZIP packen checked if you also want a ZIP archive.
- Click Icons generieren (generate icons). A completion dialog confirms where the files were written.
For a folder name of my-app, the result is:
exports/
├── my-app/
│ ├── 32x32.png
│ ├── 128x128.png
│ ├── 128x128@2x.png
│ ├── icon.png
│ ├── Square30x30Logo.png
│ ├── Square44x44Logo.png
│ ├── Square71x71Logo.png
│ ├── Square89x89Logo.png
│ ├── Square107x107Logo.png
│ ├── Square142x142Logo.png
│ ├── Square150x150Logo.png
│ ├── Square284x284Logo.png
│ ├── Square310x310Logo.png
│ ├── StoreLogo.png
│ └── icon.ico
└── my-app.zip # When ZIP packaging is enabled
The ZIP includes the my-app/ folder itself. Re-exporting to the same name replaces matching output files and the ZIP. Existing unrelated files in that folder are retained and will also be included in the ZIP, so use a dedicated export folder.
| Filename | Dimensions | Format |
|---|---|---|
32x32.png |
32 × 32 | PNG |
128x128.png |
128 × 128 | PNG |
128x128@2x.png |
256 × 256 | PNG |
icon.png |
512 × 512 | PNG |
Square30x30Logo.png |
30 × 30 | PNG |
Square44x44Logo.png |
44 × 44 | PNG |
Square71x71Logo.png |
71 × 71 | PNG |
Square89x89Logo.png |
89 × 89 | PNG |
Square107x107Logo.png |
107 × 107 | PNG |
Square142x142Logo.png |
142 × 142 | PNG |
Square150x150Logo.png |
150 × 150 | PNG |
Square284x284Logo.png |
284 × 284 | PNG |
Square310x310Logo.png |
310 × 310 | PNG |
StoreLogo.png |
50 × 50 | PNG |
icon.ico |
128 × 128, one embedded size | ICO |
The export list is defined in PNG_SIZES and ICO_SIZE in main.py. Windows-style filenames are convenience presets; the app does not create a package manifest or a complete application package.
The exporter opens the image with Pillow, converts it to RGBA, crops the center to a square, and resizes it separately for each target using Lanczos filtering.
- Best input: a square PNG at least 512 × 512 pixels, with a transparent background if needed.
- Rectangular input: edges outside the centered square are removed. There is no fit-with-padding option.
- Small input: the app upscales it; it cannot recover missing detail.
- Opaque input: the background stays opaque. This tool does not remove backgrounds.
- Animated GIF: only the initially opened frame is exported; animation is not retained.
- Vector input: SVG is not supported by this workflow. Export your vector artwork to a large PNG first.
- ICO: only a 128 × 128 entry is written. Multi-resolution ICO and macOS ICNS export are not implemented.
You can call the export function without opening the application window:
from pathlib import Path
from main import generate_icons
generate_icons(
input_path=Path("my-logo.png"),
output_dir=Path("exports/my-app"),
)This creates the PNG and ICO files. ZIP packaging is handled separately by the GUI's export action. Importing main still requires Tkinter to be installed, even when you only use the export function.
IconResizer/
├── main.py # Desktop interface and icon export functions
├── requirements.txt # Pillow dependency
├── assets/
│ ├── BG.jpeg # Window background
│ └── icons/ # Existing application icon artwork
├── docs/images/ # Real screenshot and export contact sheet
└── scripts/generate_demo.py # Reproduce and validate the README example
Generated exports, virtual environments, editor files, and executable builds are excluded from version control.
- Change
PNG_SIZESinmain.pyto adjust output filenames and dimensions. - Change
ICO_SIZEto adjust the single ICO entry size. - Replace
assets/BG.jpegto change the window background. - Replace the assets under
assets/icons/to change the window icon. The app triesicon.ico,128x128.png, andicon.pngas available. - Adjust
PALETTEandFONT_FAMILYto change the interface colors and typography. The card uses a solid dark background.
| Symptom | What to check |
|---|---|
No module named PIL |
Install requirements.txt using the same Python interpreter that starts the app. |
No module named tkinter |
Install or enable Tk support for your Python installation. |
| No background or window icon | Check that the corresponding files exist under assets/ next to main.py. Missing decorative assets do not prevent exports. |
| Part of the logo is missing | Rectangular images are center-cropped. Prepare a square source image to keep the entire design. |
| Output looks soft or pixelated | Use a larger source and simplify small-size details. |
| Export fails | Confirm that the input is a readable raster image and that the output directory is writable. |
Issues and focused pull requests are welcome. For image-processing changes, check every output dimension, alpha transparency, the ICO entry size, and the behavior of rectangular inputs. Run the demo script to validate the complete export set.