Skip to content

pmoitaly/Gdci---Gimp-for-Delphi-Components-Icons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Gdci - Delphi Delphi Components Icons (GIMP 3.0.6)

Author: Paolo Morandotti
Plugin Binary ID: py3-pl-export-delphi-icons
License: MIT

Beta version


Overview

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.

Gdci

The plugin provides three main functionalities:

  1. 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.
  2. Generate .RC files (pl-export-delphi-icons-make-rc)

    • Creates one .rc file per component.
    • References PNG files generated by the exporter.
    • Supports multiple sizes (16px + configured export sizes).
  3. 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.

Current release

v1.0 BETA2

  • New: option to export .rc in one file using Gimp project's name.
  • Fixed: regression on 16 pixel export.

Installation

  1. Copy pl-gdci.py into your GIMP plug-ins folder:

    • Windows: %APPDATA%\GIMP\3.0\plug-ins\pl-gdci\
    • Linux: ~/.config/GIMP/3.0/plug-ins/
  2. Make sure the plugin is executable (Linux/Mac):

    chmod +x pl-gdci.py
    
  3. Restart GIMP. The plugin menu will appear under: /Pl Plugin For Delphi/

Menu items:

  • Export Delphi icons...
  • Generate RC for Components...
  • Create Icons template

Usage

  1. 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.
  2. 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.
  3. 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.

Notes

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.

Future plan

  • option to export in jpg format
  • export only the current icon
  • and more.

About

This GIMP plugin automates the export of Delphi component icons in multiple sizes and formats.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages