Sunday, December 31, 2023

A Python Tkinter-Based Image Editor

 This program is a simple image editing application built using the Tkinter library in Python. Here's a description of its basic features:




  1. Toolbar with Shape Buttons:

    • The left side of the canvas contains a toolbar with buttons for various shapes, including circle, rectangle, rounded rectangle, triangle, line, curve, star, text, and an eraser.
    • Each button is associated with a specific drawing action. When a shape button is clicked, it activates the corresponding drawing mode.
  2. Canvas for Drawing:

    • The main canvas occupies the majority of the application window and serves as the drawing area.
    • The canvas is scrollable, allowing users to work on larger drawings that extend beyond the initial view.
  3. File Menu:

    • The application includes a File menu with options to open, save, save as, and view properties of the drawing.
  4. Draw Menu:

    • The Draw menu provides options for drawing basic shapes like a circle, rectangle, and rounded rectangle.
  5. View Menu:

    • The View menu includes options for zooming in, zooming out, and resetting the view to 100%.
  6. Window Menu:

    • The Window menu provides options such as settings and an about dialog, though the actual implementations are currently placeholders.
  7. Color Selection:

    • The program allows users to select a color for drawing using a color picker dialog.
  8. Eraser:

    • The eraser button activates an eraser mode, allowing users to erase parts of their drawings.
  9. Zooming and Panning:

    • Placeholder buttons for zooming in, zooming out, moving the image, panning, rotating, changing font, and adjusting font size are present in the toolbar.
  10. Tooltips:

    • Tooltips are implemented for each button on the toolbar, providing users with information about the functionality of each button when they hover over it.
  11. Text Drawing:

    • There is a button for drawing text on the canvas, though the actual implementation is a placeholder.
  12. Cursor Lines:

    • During drawing or other operations, vertical and horizontal lines are displayed as a visual aid to indicate the current cursor position.
  13. Saving and Opening Images:

    • Users can open existing images for editing or save their drawings as image files.
  14. Properties Window:

    • There is a placeholder properties window that displays information such as width and height.
  15. Resizable Canvas:

    • The canvas adjusts its size based on the loaded image or drawing, and users can view and modify properties like width and height.
  16. Mouse Interaction:

    • The application captures mouse events to facilitate drawing and other interactive actions on the canvas.

It's worth noting that some functionalities like zooming, panning, rotating, changing font, and adjusting font size are currently implemented as placeholders and may require further development.

The source code is available at my patreon shop. It is just a demo program ideal if you are interested to improve the software further on your own where anything is possible. Currently, implemented features are draw circles, open, edit and save images and of course the screen layout. I will upload the near finished version at my patreon shop as a separate item.

No comments:

Post a Comment