Author: Paolo Morandotti
Plugin Binary ID: py3-pl-export-delphi-icons
License: MIT
Beta version
This GIMP plugin automates the export of Delphi component icons in multiple sizes and formats. It works without using PDB procedures.
Tested with GIMP 3.0.6 (GTK3 / Python-GI) in Windows and used with Embarcadero Delphi 12.1.
The plugin provides three main functionalities:
-
Export Delphi component icons (
pl-gdci)- Iterates layers named
Cmp ...in the current image. - Displays each component with the "Small logo" layer.
- Exports BMP and PNG variants for multiple predefined sizes.
- BMPs are merged/flattened once per component, while PNGs maintain transparency.
- Iterates layers named
-
Generate .RC files (
pl-export-delphi-icons-make-rc)- Creates one
.rcfile per component. - References PNG files generated by the exporter.
- Supports multiple sizes (16px + configured export sizes).
- Creates one
-
Create template image (
pl-export-delphi-icons-create-template)- Creates a new 1024×1024 template image with predefined layers:
Transparent Background(transparent)Fucsia Background(filled with #ff00ff)Small logo(white rectangle where place your logo)Duplicate and rename as Cmp TMyComponent(placeholder layer)
- Always available in the menu, even without open images.
- Creates a new 1024×1024 template image with predefined layers:
v1.0 BETA2
- New: option to export .rc in one file using Gimp project's name.
- Fixed: regression on 16 pixel export.
-
Copy
pl-gdci.pyinto your GIMP plug-ins folder:- Windows:
%APPDATA%\GIMP\3.0\plug-ins\pl-gdci\ - Linux:
~/.config/GIMP/3.0/plug-ins/
- Windows:
-
Make sure the plugin is executable (Linux/Mac):
chmod +x pl-gdci.py
-
Restart GIMP. The plugin menu will appear under:
/Pl Plugin For Delphi/
- Export Delphi icons...
- Generate RC for Components...
- Create Icons template
-
Create a Template Image
- Select Create _Icons template from the menu.
- A new 1024×1024 image is created with all required layers.
- Do not remove nor rename "Small logo", "Transparent background" and "Fucsia Background" layers.
- Duplicate one placeholder layer for each component and rename it "Cmp TYourComponentName".
- Paint in each layer its icon.
- Draw your library logo in the Small logo layer.
- Save your image as .xcf file.
-
Export Component Icons
- Open an image created as stated above.
- Select Export Delphi icons... menu.
- Choose an output folder via the dialog.
- The plugin generates BMP (with Fucsia background) and PNG (with transparency) for multiple sizes.
-
Generate .RC Files
- After exporting, select Generate _RC for Components...
- Choose an output folder for .rc files.
The plugin creates one .rc file per component, referencing all PNG files for multiple sizes.
Component layers must start with Cmp to be recognized by the exporter.
Small logo is used as an overlay for all exported icons.
Fucsia background is used only for BMP export; PNG export maintains transparency.
The plugin uses Python-GI only, avoiding legacy PDB calls.
Menu entries respect the menu path but are always available for template creation.
Export Sizes
By default, the plugin exports icons at the following sizes:
16, 24, 32, 48, 72, 96, 128, 256, 512, 1024 px
BMP and PNG variants are generated for each size.
- option to export in jpg format
- export only the current icon
- and more.