Skip to content

HackingPain/PixieSwitch

Repository files navigation

PixieSwitch - Batch Image Converter (GUI + CLI)

PixieSwitch is a fun, simple GUI to convert images between popular formats. Drop in files, pick an output format, tweak a few options, and go. It handles batch conversion, optional metadata preservation/stripping, basic resizing, and animations (GIF/WebP/APNG).

Features

  • Drag & Drop files and folders (recursively adds images)
  • Output formats: JPG/JPEG, PNG, GIF, WebP, TIFF, BMP, JPEG2000 (JP2/J2K), and optional HEIF/HEIC/AVIF (with pillow-heif)
  • Animation-aware: Keep animation for GIF/WebP/APNG (when source is animated)
  • Metadata: preserve EXIF (JPEG) or strip all metadata
  • Resize: constrain longest edge (px)
  • Quality: set lossy compression quality for JPEG/WebP/AVIF/etc.
  • PNG compression level: 0 (fast/big) ... 9 (slow/small)
  • Suffix & Output folder controls
  • Multithreaded conversion
  • Settings persistence - your options are remembered between sessions
  • Keyboard shortcuts - Ctrl+O (add), Delete (remove), Ctrl+Enter (convert), etc.
  • Presets - built-in (Web Optimized, Archive, Social Media) and custom
  • Image preview - select a file to see thumbnail, dimensions, and size
  • Conversion stats - success/fail count, elapsed time, bytes written
  • Dark/light theme - auto-detected from system settings
  • CLI mode - python -m pixieswitch convert --help

Install

Python 3.10+ recommended (tested on 3.13). Windows, macOS, Linux.

  1. Create & activate a virtual env (recommended)
  2. pip install -r requirements.txt
  3. python -m pixieswitch (GUI) or python main.py

CLI usage

python -m pixieswitch convert --input *.png --format webp --quality 85 --output ./out/
python -m pixieswitch convert --input ./photos/ --format jpg --resize 1920
python -m pixieswitch convert --help

Optional extras

  • HEIF/HEIC/AVIF: install pillow-heif (included in requirements). If your platform lacks libheif, follow the package docs.
  • Animated WebP: we include imageio for better animated WebP handling. If issues arise, Pillow fallback is used.

Build a standalone app

pip install pyinstaller
pyinstaller PixieSwitch.spec
# Output in dist/PixieSwitch/

Development

pip install -r requirements.txt
pip install pytest pytest-cov ruff mypy
pytest --cov=pixieswitch -v
ruff check pixieswitch/ tests/
mypy pixieswitch/ --ignore-missing-imports

Keyboard shortcuts

Action Shortcut
Add Files Ctrl+O
Remove Selected Delete
Clear List Ctrl+Shift+Delete
Convert Ctrl+Enter
Cancel Escape
Browse Output Ctrl+Shift+O

Usage tips

  • Transparency -> JPEG: JPEG has no alpha; we composite on white by default.
  • EXIF vs Strip: "Strip ALL metadata" overrides "Preserve EXIF."
  • Animated output: GIF, WebP, and APNG are supported. Other targets will use the first frame.
  • JPEG2000: Quality handling varies by Pillow build. If unsupported, you'll see an error per file.

Project structure

pixieswitch/
    __init__.py          # APP_NAME, __version__
    __main__.py          # Entry point
    converter.py         # Core conversion logic (no GUI deps)
    formats.py           # Format constants
    settings.py          # QSettings wrapper
    cli.py               # CLI mode
    gui/
        main_window.py   # Main window
        drop_list.py     # Drag-and-drop list widget
        style.py         # Theme detection and stylesheets
        presets.py       # Preset management
main.py                  # Thin shim -> pixieswitch.__main__
tests/                   # pytest test suite

License

MIT

About

Batch image converter with GUI and CLI. Supports JPG, PNG, GIF, WebP, TIFF, BMP, JPEG2000, HEIF/AVIF with animation, metadata control, presets, and resizing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages