π Welcome to Watermark-Me, a Django-based project that empowers users to effortlessly add watermarks to their images through a simple and interactive web interface. Dive in and make your images uniquely yours!
Explore the live demo: Watermark-Me Live Demo
- User-friendly Interface: Intuitive web interface for adding watermarks to your images, designed with simplicity in mind.
- Customization Options: Tailor your watermarks with options like text, size, quality, opacity, and the number of watermarks.
- Modern Frontend: A visually appealing frontend crafted using HTML, CSS, JS, and Bootstrap for a seamless and responsive experience.
- API Integration: Seamlessly integrate the API for programmatically watermarking images.
-
Clone the Repository:
git clone https://github.com/rajatrawal/watermark.me
-
Navigate to the Project Directory:
cd watermark-me
-
Install Dependencies:
pip install -r requirements.txt
-
Run Migrations:
python manage.py migrate
-
Start the Development Server:
python manage.py runserver
-
Access Watermark-Me: Open your web browser and visit http://127.0.0.1:8000/ to begin your watermarking journey!
- Access the Web Interface: Open the user-friendly web interface.
- Choose Your Image: Select the image file you want to watermark.
- Customize Your Watermark: Personalize your watermark with options like text, size, quality, opacity, and the number of watermarks.
- Click "Watermark": Effortlessly process your image by clicking the "Watermark" button.
π We welcome contributions! Feel free to open issues or submit pull requests to help enhance the Watermark-Me experience.
To programmatically watermark images using the Watermark-Me API, refer to the Python example below:
import requests
import urllib
# Example values
values = {
"username": "YOUR_USERNAME",
"key": "YOUR_API_KEY",
"watermarkText": "WATERMARK_TEXT",
"noOfWatermark": NO_OF_WATERMARK,
"size": SIZE_OF_WATERMARK,
"opacity": OPACITY_OF_WATERMARK,
"quality": QUALITY_OF_IMAGE
}
url = "https://watermark-me.onrender.com/api/watermarkImage/"
files = {'images': open(r'YOUR_IMAGE_PATH', 'rb')}
# API request
r = requests.post(url, files=files, data=values)
data = r.json()
# Download watermarked images
for i in data:
name = i.split('/')[-1]
urllib.request.urlretrieve(i, name)
- username: Your username is
[email protected]
(Mandatory Field). - key: Your API key is
ed9f7f84-0d2f-41ed-b1f5-4gc20e65c025
[Example] (Mandatory Field). - watermarkText: The watermark text will be printed on the image (Default = "watermark.me").
- noOfWatermark: The number of watermark texts on the image (An integer field, Default = 1, Min = 1, and Max = 5).
- size: Size of the watermark in % of height (An integer field, Default = 5, Min = 1, and Max = 100).
- opacity: Opacity of the watermark (An integer field, Default = 100, Min = 1, and Max = 100).
- quality: Quality of the watermarked image (An integer field, Default = 100, Min = 1, and Max = 100).
- 200 Response [POST]: List of file URLs (
['FILE_URL_1', 'FILE_URL_2', ...]
). - 404 Response [GET]: {'message': 'invalid request type'}.
- 404 Response [Invalid username or key]: {'message': 'invalid user or API key'}.
To send multiple files, use the following format:
files = [
('images', open(r'YOUR_IMAGE_PATH_1', 'rb')),
('images', open(r'YOUR_IMAGE_PATH_2', 'rb'))
]
If you encounter any issues or have questions, feel free to reach out to us through the GitHub Issues page.
Thank you for choosing Watermark-Me! π Happy watermarking!