
Learn to build a photoshop-like drawing app with Tkinter and Python, exploring brush types, colors, sizes, canvas color, and saving or clearing canvases.
Check out my student Facebook Group...
It's a great place to get fast support for this course from me, to interact with other students, to post your projects and code, and to access course announcements and extras...
Join Now!
https://www.facebook.com/groups/codemycom/
Download and install python from python.org, choose the 32-bit installer, add python to path, avoid customizing installation, and accept defaults for a smooth setup.
Install sublime text and git bash terminal to set up your development environment for building a photoshop-like app with tkinter and python gui apps, using the course's recommended tools.
Build your first Tkinter counter program by creating a window with an 800 by 800 size and a title, save as paint.py in a paint directory, and run with Python.
Create a canvas widget in the root window with a 600 by 400 white background. Pack it with 20 pixels of vertical padding to begin drawing on the canvas.
Learn to draw a straight line on a Tkinter canvas with create_line, using coordinates x1,y1,x2,y2 and a red color, and understand the canvas coordinate system.
Bind the mouse to the canvas for drawing with click and drag, using Tkinter bindings like B1 motion and a paint function that processes mouse events.
Draw with the mouse by painting on the canvas, using the paint function to track mouse motion, set color and brush size, and apply smoothing.
Define brush parameters for a Tkinter photoshop-like app to adjust size, color, and brush type; implement cap styles - round, projecting (diamond), and slash - and plan runtime updates.
Create a brush options frame under the canvas to host controls for color and size, and wire it into the root window using a simple pack layout.
Create a brush size frame, place it inside the brush options frame with a label frame, and arrange controls using the grid layout.
Create a brush size slider with the t.k scale widget, vertical range 1–100 inside brush size frame, and bind it to a change brush size function to resize the brush.
Create a brush size label that updates as the Tkinter slider moves, convert the slider value to an integer, and apply it to the canvas drawing in the paint function.
Implement brush type selection in a tkinter app using radio buttons and a string variable to track round, slash, and diamond brushes, updating the canvas in real time.
Create a change colors panel in the brush options frame with brush color button and canvas color button, and define placeholder functions to implement those color changes.
Use the color chooser to update brush and canvas colors by selecting a hex color returned by the color chooser, using a global brush color with a black default.
Build a program options panel in a Tkinter Python GUI to add clear screen and save image buttons, wiring them to clear_screen and save_image functions and placing controls with grid.
Implement a clear screen function for the canvas by calling canvas.delete to remove all items, then reset the canvas background color to white for quick redraws.
Create a save as dialog with tkinter's filedialog to prompt for a file name and location. Initialize it in the paint/images directory and filter to PMG files (star dot PMG).
Implement a python tkinter logic to ensure saved images have the correct png extension. Check the filename ends with .png and append it if missing, via a simple if statement.
Install pillow with pip, import PIL components like Image, ImageDraw, and ImageGrab, then capture a program snapshot to save your canvas as an image.
Save the image by using Pillow to capture the canvas area with coordinates, crop the rest, and save as png after choosing a file name.
Add a save confirmation using a tkinter message box that displays 'image saved' after saving, importing the message box widget and using showinfo for clear user feedback.
Convert your Python program into a standalone exe using a packaging tool, producing a single file for Windows, Linux, and Mac with a dist folder.
Build a photoshop-like app with Tkinter and Python GUI, plus explore project-based Tkinter courses such as a paint app and mp3 player, all included with lifetime membership.
In this course I'll teach you how to make graphical user interfaces for Python using TKinter. You'll be surprised just how quickly you can create some pretty cool looking apps!
I'll show you the ins and outs of tKinter, and then I'll show you how to package your app as an .exe file that you can share with others!
We'll be building out a Paint/Drawing program throughout the course! You'll be able to draw on a canvas, choose from three different brush types, change the color of the brush and canvas, and change the size of the brush. You'll also be able to save the images.
If you've ever wanted to create GUI apps with Python, this is the course for you!
The app we build won't be as sophisticated as PhotoShop or any other professional drawing program, that's not the point of the course. The point is to show you how easy it can be to utilize some drawing features in a graphical user interface app with Python and Tkinter.
Don't worry, if you don't have any prior experience with Python or Tkinter, you should be perfectly comfortable taking this class. If you do have some experience with Python, and especially Tkinter, then you should enjoy this course even more!