Skip to content

02Anmol/wallPaper-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

wallPaper-viewer

Just a basic practice of Python with Library Tkinter.

This is a clean, functional script for a basic Wallpaper Viewer using Python's Tkinter library. It’s a great example of how to handle image manipulation and GUI state.Here is a structured README.md designed to make your project look professional and easy to navigate.

πŸ–ΌοΈ Wallpaper ViewerA lightweight, Python-based GUI application built with Tkinter and Pillow that allows users to cycle through a collection of images stored in a local directory.

πŸš€ FeaturesDynamic Loading: Automatically reads all image files from a specific folder. Auto-Resizing: Images are dynamically resized to fit a standard portrait orientation ($200 \times 300$). Infinite Loop: Uses a modulo operator logic to ensure the "Next" button cycles through images indefinitely without crashing.Clean UI: Minimalist black-themed interface.

πŸ› οΈ PrerequisitesBefore running the script, ensure you have Python installed and the Pillow library for image processing.Bashpip install Pillow

πŸ“ Project StructureTo run this script successfully, your directory should look like this:Plaintext. β”œβ”€β”€ main.py # Your python script └── wallpapers/ # Folder containing your .jpg or .png files β”œβ”€β”€ image1.jpg β”œβ”€β”€ image2.png └── ...

πŸ’» How It WorksThe application follows a simple but effective logic flow:1. Image ProcessingThe script uses os.listdir to grab filenames and the Pillow (PIL) library to open and resize them so they fit the GUI window perfectly.2. State ManagementA counter variable tracks the current image index. The rotate_img function updates the display using the formula:counter % len(img_array)This ensures that even if you click "Next" a thousand times, the index always wraps back to the start of your image list.

πŸ“ UsagePlace all your desired images in a folder named wallpapers.Run the script:Bashpython main.py Click the Next button to cycle through your wallpapers!

About

Just a basic practice of Python with Library Tkinter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages