Skip to content

jdamboeck/preview-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preview Maker

A GTK-based application for creating image previews with AI-powered highlight overlays.

Overview

Preview Maker is a desktop application that helps users create engaging image previews by automatically identifying and highlighting interesting regions in images. It uses Google's Gemini AI to analyze images and identify areas of interest, then creates circular overlays to draw attention to these areas.

Features

  • Load and display images in various formats (JPEG, PNG, BMP, TIFF)
  • Analyze images using Google Gemini AI to identify interesting regions
  • Create circular highlight overlays on images
  • Save processed images with overlays
  • Modern GTK 4.0 user interface with drag-and-drop support
  • Headless mode for batch processing

Installation

Prerequisites

  • Python 3.8 or higher
  • GTK 4.0
  • PyGObject
  • Pillow (PIL)
  • Google Gemini API key

Setup

  1. Clone the repository:

    git clone https://github.com/jdamboeck/preview-maker.git
    cd preview-maker
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the application:

    python -m preview_maker.app

Docker

For development and testing, you can use the provided Docker environment:

docker-compose -f rebuild_plan/docker/docker-compose.yml run --rm app

Usage

GUI Mode

  1. Launch the application
  2. Click "Open" to select an image
  3. Enter your Google Gemini API key when prompted
  4. Click "Analyze" to process the image
  5. Save the result using the "Save" button

Headless Mode

For batch processing or integration with other tools, use headless mode:

python -m preview_maker.app --headless --image input.jpg --output output.jpg --api-key YOUR_API_KEY

Development

Project Structure

  • preview_maker/ - Main package
    • app.py - Application entry point
    • core/ - Core functionality
    • image/ - Image processing components
    • ai/ - AI integration components
    • ui/ - User interface components
  • tests/ - Test suite
  • rebuild_plan/ - Project documentation and planning

Running Tests

# Run all tests
pytest

# Run tests in headless mode (for CI/CD)
HEADLESS=1 pytest

# Run specific test modules
pytest tests/ui/

License

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

Acknowledgments

  • Google Gemini API for image analysis
  • GTK team for the UI toolkit
  • PyGObject team for Python bindings

About

A GTK-based application for analyzing images using Google's Gemini AI API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors