Skip to content

Commit 7b67849

Browse files
authored
Merge pull request #43 from iamnehalien29/main
Random Quote Generator
2 parents 524c8fd + da572c0 commit 7b67849

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed

Java/Java/Resizerr/Readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# 🖼️ Batch Image Resizer (Java)
2+
3+
A simple yet powerful Java program to **resize multiple images at once** to a specified resolution.
4+
Perfect for photographers, developers, and designers who want to quickly prepare images for web, apps, or print.
5+
6+
---
7+
8+
## 🚀 Features
9+
✅ Resize multiple images (JPG / JPEG / PNG) in bulk
10+
✅ Maintains smooth quality using `SCALE_SMOOTH`
11+
✅ Automatically creates the output folder if it doesn’t exist
12+
✅ Displays progress and error messages in the console
13+
14+
---
15+
16+
## 🧩 Requirements
17+
- **Java 17 or higher** (tested on Java 25)
18+
- A folder containing `.jpg`, `.jpeg`, or `.png` images
19+
20+
---
21+
22+
## 📁 Project Structure
23+
115 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Random Motivational Quote Generator
2+
3+
A simple Python desktop app that shows a **random motivational quote** over a background image, updating every 5 seconds. Built with **Tkinter** and **Pillow**.
4+
5+
---
6+
7+
## Features
8+
9+
- Displays a **background image**.
10+
- Shows **random quotes** that refresh automatically.
11+
- Avoids repeating the same quote twice.
12+
13+
---
14+
15+
## Requirements
16+
17+
- Python 3.6+
18+
- Pillow (`pip install pillow`)
19+
20+
---
21+
22+
## Usage
23+
24+
1. Place your background image (`Seep.png`) in the project folder.
25+
2. Run the app:
26+
27+
```bash
28+
python random_motivational.py
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import tkinter as tk
2+
import random
3+
4+
# List of motivational quotes
5+
quotes = [
6+
"Life isn't about getting and having, it's about giving and being. - Kevin Kruse",
7+
"Whatever the mind of man can conceive and believe, it can achieve. - Napoleon Hill",
8+
"The only way to do great work is to love what you do. - Steve Jobs",
9+
"Strive not to be a success, but rather to be of value. - Albert Einstein",
10+
"I attribute my success to this: I never gave or took any excuse. - Florence Nightingale",
11+
"You miss 100% of the shots you don't take. - Wayne Gretzky",
12+
"Every strike brings me closer to the next home run. - Babe Ruth",
13+
]
14+
15+
last_quote = None
16+
17+
# Initialize main window
18+
root = tk.Tk()
19+
root.title("Motivational Quote Generator")
20+
21+
# Set window size
22+
screen_width = root.winfo_screenwidth()
23+
screen_height = root.winfo_screenheight()
24+
root.geometry(f"{screen_width}x{screen_height}")
25+
root.configure(bg="black") # Background color
26+
27+
# Create label to display quote
28+
quote_label = tk.Label(
29+
root,
30+
text=random.choice(quotes),
31+
font=("Helvetica", 32, "italic"),
32+
fg="white",
33+
bg="black",
34+
wraplength=int(screen_width * 0.7),
35+
justify="center"
36+
)
37+
quote_label.pack(expand=True)
38+
39+
# Function to update quote
40+
def update_quote():
41+
global last_quote
42+
new_quote = random.choice(quotes)
43+
while new_quote == last_quote:
44+
new_quote = random.choice(quotes)
45+
last_quote = new_quote
46+
quote_label.config(text=new_quote)
47+
root.after(5000, update_quote) # Update every 5 seconds
48+
49+
update_quote() # Start updating
50+
51+
root.mainloop()

0 commit comments

Comments
 (0)