Skip to content

Telegram bot for adding logo watermarks to images. Features multiple placement styles, customizable size and opacity, user management, and Koyeb deployment support.

Notifications You must be signed in to change notification settings

3bkader-gpt/Logo_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Logo Bot

Telegram Bot for Adding Watermarks to Images

Python Telegram Pillow Koyeb

Multiple Styles β€’ Customizable β€’ Easy to Use

Features β€’ Installation β€’ Usage β€’ Contributing

Ψ§Ω„ΨΉΨ±Ψ¨ΩŠΨ© | English


πŸ“‹ Table of Contents


🎯 Overview

Logo Bot is a Telegram bot for adding watermarks (Logos) to images. Includes multiple placement styles, customizable size and opacity, user management, and Koyeb deployment support.

✨ Why Logo Bot?

  • πŸ–ΌοΈ Easy to Use - Add watermarks in simple steps
  • 🎨 Customizable - Adjustable size, opacity, and position
  • πŸ“ Multiple Styles - Different options for watermark placement
  • πŸš€ Easy Deployment - Full Koyeb support

🌟 Features

πŸš€ Main Features

Feature Description
πŸ–ΌοΈ Watermark Addition Easily add logos to images
πŸ“ Multiple Styles Different options for watermark placement (corner, center, etc.)
🎚️ Customizable Adjustable size and opacity
πŸ‘₯ User Management Track and manage users
πŸš€ Koyeb Deployment Easy deployment support on Koyeb
🎯 Easy to Use Simple and clear bot interface

🎨 Customization Options

  • βœ… Size: Watermark size ratio from image (10% - 50%)
  • βœ… Opacity: Opacity level (0 - 255)
  • βœ… Position: 9 different positions (top/middle/bottom Γ— left/center/right)
  • βœ… Formats: Support PNG, JPG, JPEG, WEBP

πŸ“¦ Requirements

Before starting, make sure you have installed:

  • Python 3.8 or higher
  • Telegram Bot Token (from @BotFather)
  • Logo Image in PNG format
  • Git

πŸš€ Installation

Installation Steps

# 1. Clone the repository
git clone https://github.com/3bkader-gpt/Logo_bot.git
cd Logo_bot

# 2. Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# 3. Install requirements
pip install -r requirements.txt

# 4. Set up environment file
cp .env.example .env
# Edit .env file with your data

Setting up .env File

BOT_TOKEN=your_telegram_bot_token_here
LOGO_PATH=path/to/your/logo.png

βš™οΈ Configuration

Telegram Bot Setup

  1. Talk to @BotFather
  2. Create a new bot using /newbot
  3. Follow instructions and get Token
  4. Add Token in .env file:
    BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz

Logo Setup

  1. Prepare logo image in PNG format (transparent background recommended)
  2. Place image in project folder
  3. Add path in .env file:
    LOGO_PATH=./logo.png

Customizing Default Settings

You can modify default settings in code:

DEFAULT_SIZE = 0.15      # 15% of image size
DEFAULT_OPACITY = 200    # Medium opacity
DEFAULT_POSITION = "bottom-right"  # Bottom right

πŸ“– Usage

Usage Steps

  1. βœ… Search for the bot in Telegram
  2. βœ… Start conversation using /start
  3. βœ… Send image you want to add watermark to
  4. βœ… Choose position from menu
  5. βœ… Choose size (small/medium/large)
  6. βœ… Choose opacity (transparent/medium/opaque)
  7. βœ… Get modified image

Available Commands

Command Description
/start Start using the bot
/help Show help and commands
/settings Watermark settings
/logo Change logo

Usage Examples

User: Send image
Bot: Choose watermark position:
      1. Top left
      2. Top center
      3. Top right
      ...

User: 1
Bot: Choose watermark size:
      1. Small (10%)
      2. Medium (20%)
      3. Large (30%)

User: 2
Bot: [Sends modified image]

πŸ“ Project Structure

Logo_bot/
β”œβ”€β”€ πŸ“„ bot.py              # Main bot code
β”œβ”€β”€ πŸ“„ main.py              # Entry point
β”œβ”€β”€ πŸ“„ .env.example         # Environment file example
β”œβ”€β”€ πŸ“„ requirements.txt     # Requirements
└── πŸ–ΌοΈ logo.png             # Logo image (add yourself)

πŸ› οΈ Technologies Used

Technology Description
Python Main programming language
Telegram Telegram bot
Pillow Image processing
Flask Web server (for Koyeb deployment)

πŸš€ Deployment on Koyeb

Deployment Steps

  1. βœ… Create account on Koyeb
  2. βœ… Link repository from GitHub
  3. βœ… Add environment variables:
    • BOT_TOKEN: Bot token
    • LOGO_PATH: Logo path
  4. βœ… Deploy application

Koyeb Settings

  • Build Command: pip install -r requirements.txt
  • Start Command: python main.py
  • Environment: Python 3.8+

🀝 Contributing

Contributions are welcome! πŸŽ‰

  1. 🍴 Fork the project
  2. 🌿 Create a branch (git checkout -b feature/AmazingFeature)
  3. πŸ’Ύ Commit (git commit -m 'Add some AmazingFeature')
  4. πŸ“€ Push (git push origin feature/AmazingFeature)
  5. πŸ”„ Open a Pull Request

Contribution Ideas

  • ✨ Add new watermark styles
  • 🎨 Improve image processing quality
  • πŸ“± Add animated image support (GIF)
  • πŸ”„ Multi-logo support

⚠️ Important Notes

  • βš–οΈ Make sure you have permission to use images and watermarks
  • πŸ”’ Protect your bot information
  • πŸ“Š Monitor memory usage when processing large images

πŸ“„ License

This project is open source and available for free use.


πŸ“ž Contact & Support


Made with ❀️ by Mohamed Omar

⭐ If you like this project, don't forget to give it a star!

⬆ Back to Top

About

Telegram bot for adding logo watermarks to images. Features multiple placement styles, customizable size and opacity, user management, and Koyeb deployment support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages