A graphical tool for viewing and editing metadata in PNG files.
Find a file
2026-01-07 22:30:21 +01:00
.gitignore added versioning, requirements and setup 2026-01-06 16:15:18 +01:00
AppIcon.icns added icon file 2026-01-05 18:58:50 +01:00
AppIcon.ico ico file for windows build and setup for windows 2026-01-06 19:37:57 +01:00
LICENSE Initial commit 2026-01-05 18:56:06 +01:00
png-meta-editor.py feat(v2.3.0): add JSON flattening, fix file handle leaks, update README 2026-01-07 22:30:21 +01:00
README.md feat(v2.3.0): add JSON flattening, fix file handle leaks, update README 2026-01-07 22:30:21 +01:00
requirements.txt added versioning, requirements and setup 2026-01-06 16:15:18 +01:00
screenshot.png feat(v2.3.0): add JSON flattening, fix file handle leaks, update README 2026-01-07 22:30:21 +01:00
setup.py ico file for windows build and setup for windows 2026-01-06 19:37:57 +01:00
version.txt added versioning, requirements and setup 2026-01-06 16:15:18 +01:00

PNG Metadata Editor v2.3.0

A graphical tool for viewing and editing metadata in PNG files with an intuitive image browser interface.

PNG Metadata Editor Screenshot

Features

Core Features

  • View all metadata fields (tEXt, zTXt, iTXt chunks) in PNG files
  • Add, edit, and delete metadata fields
  • Copy metadata values to clipboard
  • Visual indication of unsaved changes
  • Pretty-print JSON values in editor (auto-flattens on save)

Image Browser

  • Browse directories with thumbnail previews
  • Auto-scroll to selected images
  • Trackpad and mousewheel scrolling support
  • Smooth navigation between multiple files

User Interface

  • Automatic dark mode detection (macOS, Windows, Linux)
  • Adaptive canvas background based on system theme
  • Unicode support throughout UI
  • Resizable panes for optimal workflow

Technical Improvements

  • Smart JSON handling: displays formatted, saves flattened
  • Proper file handle management for reliable multi-file loading
  • Enhanced scroll region updates for smooth browsing

Installation

Prerequisites

  • Python 3.6+
  • Tkinter (usually included with Python)

Dependencies

Install required packages using pip:

pip install pillow

Usage

Basic Workflow

  1. Run the application:

    python png-meta-editor.py
    
  2. Browse Directory: Click "Browse Directory" to load thumbnails from a folder

  3. Select Image: Click any thumbnail to load its metadata

  4. View Metadata: See all fields in the tree view with preview

  5. Edit Fields:

    • Double-click or use "Edit Field" to modify values
    • JSON values display formatted but save flattened
  6. Save Changes: Click "Save Changes" to write metadata back to file

Keyboard Shortcuts

  • Double-click on tree item to edit
  • Enter/Escape in dialogs to confirm/cancel

Dark Mode

The application automatically detects your system theme:

  • macOS: Reads AppleInterfaceStyle setting
  • Windows: Reads personalization registry settings
  • Linux: Checks GTK theme preferences

Building for Distribution

  1. First install the required build tools:

    pip install pyinstaller
    
  2. Build the application for your platform:

    python build.py
    
  3. The resulting executable will be in the dist/ directory

Manual PyInstaller Commands

Windows

pyinstaller --name="PNG Metadata Editor" \
            --windowed \
            --onefile \
            --icon=AppIcon.ico \
            --version-file version.txt \
            png-meta-editor.py

macOS

pyinstaller --name="PNG Metadata Editor" \
            --windowed \
            --onefile \
            --icon=AppIcon.icns \
            --version-file version.txt \
            png-meta-editor.py

Linux

pyinstaller --name="PNG Metadata Editor" \
            --windowed \
            --onefile \
            png-meta-editor.py

Required Files

For building, you'll need:

  • version.txt (for version information)
  • AppIcon.ico (Windows icon)
  • AppIcon.icns (Mac icon)
  • requirements.txt (for dependencies)

Technical Details

JSON Handling

The editor intelligently handles JSON metadata:

  • Display: Pretty-printed with indentation for readability
  • Storage: Automatically flattened to single line to preserve original format
  • Example:
    // What you see in editor:
    {
      "prompt": "a cat",
      "steps": 20
    }
    
    // What gets saved:
    {"prompt":"a cat","steps":20}
    

File Management

  • Proper file handle release after reading metadata
  • Supports loading multiple files sequentially without issues
  • Thumbnail caching for smooth browsing experience

License

This project is licensed under the MIT License - see LICENSE for details.

Author

Robert Tusa
robert@tusa.at

Version History

v2.3.0 (2026-01-07) - Major UI Update

  • Added image browser with thumbnail previews
  • Implemented dark mode detection for all platforms
  • Added trackpad/mousewheel scrolling support
  • Smart JSON flattening (preserves original format)
  • Fixed file loading issues with proper handle management
  • Enhanced scroll region updates
  • Unicode support in UI elements

v1.0.0 (2026-01-05) - Initial Release

  • Basic metadata viewing and editing
  • Tree view with detail pane
  • Add, edit, delete operations
  • JSON pretty-printing