GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Poyamohamadi/Photo_Editor: Photo Editor - Python🐍 CustomTkinter & Pillow

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
demo.gif
demo.gif
 
 
main.py
main.py
 
 
picture.jpg
picture.jpg
 
 

Repository files navigation

Photo Editor

A sleek, modern photo editing application built using Python, CustomTkinter, and Pillow (PIL). This tool allows users to enhance and filter images with real-time adjustments including brightness, color, sharpness, blur, and various advanced filters like edge detection, emboss, and more.

Table of Contents

  1. Features
  2. Installation
  3. Usage
  4. Structure
  5. Dependencies
  6. Contributing
  7. License

Program Demo

Photo_Editor

Features

  • Open & Edit Images: Load any image from your system.
  • Enhancement Tools:
    • Brightness adjustment
    • Color saturation
    • Sharpness control
  • Filter Effects:
    • Blur, Smooth, Smooth More
    • Sharpen, Contour, Detail, Edge Enhance, Edge Enhance More
    • Find Edges, Emboss
  • Advanced Filters:
    • Min, Median, Max, Mode Filters
    • Box Blur, Gaussian Blur, Unsharp Mask
  • Real-Time Preview: See changes instantly applied to your image.
  • Modern UI: Built with customtkinter for a clean, responsive interface.

Installation

Prerequisites

  • Python 3.7 or higher
  • Basic knowledge of running Python scripts.

Steps

  1. Clone the repository:

    git clone https://github.com/Poyamohamadi/photo_editor.git
    cd photo_editor
  2. Install required dependencies:

    pip install customtkinter pillow
  3. Ensure you have a starting image named picture.jpg in the project directory (or use the "Open Picture" button to load any image).

  4. Run the application:

    python main.py

Usage

  1. Launch the app:

    python main.py
  2. Click "Open Picture" to load an image from your device.

  3. Choose editing mode:

    • Enhance: Adjust brightness, color, and sharpness using sliders.
    • Filter: Apply visual effects via toggle switches and sliders.
  4. Toggle filters on/off:

    • Simple filters (e.g., Blur, Sharpen) activate instantly.
    • Advanced filters (e.g., Median, Gaussian Blur) show a slider when enabled.
  5. View results in real time — no manual "Apply" button needed!

  6. Close the app when done.

Note: Edited images are temporarily saved as new_picture.png during runtime.


Structure

The project is contained in a single script (main.py) with a class-based structure for modularity and readability.

Key Components

App(CTk)

Main class inheriting from customtkinter.CTk. Manages the entire UI and image processing logic.

Core Methods:
  • __init__(): Initializes variables, window settings, and starts the app loop.
  • run(): Sets up the main UI layout — button and image display frame.
  • open_image(): Opens a file dialog to load an image.
  • show_edit(value): Displays the editing panel with mode selector.
  • set_edit(value): Switches between "Enhance" and "Filter" modes.
  • enhance(): Adds sliders for brightness, color, and sharpness.
  • filter(): Builds a scrollable panel with toggleable filters and dynamic sliders.
  • edit_img(): Applies all selected enhancements and filters in sequence and updates the preview.
Variables:
  • DoubleVar, IntVar, BooleanVar: Track slider values and toggle states.
  • picture: Original image loaded from file.
  • new_picture: Working copy used for edits.
Image Processing:

Uses Pillow modules:

  • ImageEnhance.Brightness, Color, Sharpness
  • ImageFilter.BLUR, SHARPEN, EMBOSS, FIND_EDGES, etc.

Dependencies

This project uses the following libraries:

Library Purpose
customtkinter Modern GUI framework with dark/light themes
Pillow (PIL) Image loading, manipulation, and filtering
tkinter File dialog integration (via filedialog)

Install them using:

pip install customtkinter pillow

Contributing

We welcome contributions! To help improve this project:

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature/new-filter
  3. Commit your changes: git commit -m "Add brightness reset button"
  4. Push to the branch: git push origin feature/new-filter
  5. Open a pull request.

Please ensure your code matches the existing style and includes comments where necessary.


License

This project is licensed under the MIT License.
See LICENSE for more details.


Acknowledgments

  • Thanks to the CustomTkinter team for a beautiful and easy-to-use GUI library.
  • Pillow developers for powerful image processing in Python.
  • The Python community for continuous innovation and support.

Contact

Have questions or suggestions? Reach out:

  • GitHub: @Poyamohamadi

Thank you for using Photo Editor! Let your creativity shine, one filter at a time.

About

Photo Editor - Python🐍 CustomTkinter & Pillow

Topics

customtkinterpillowpython

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.