-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Currently, the image generation Gradio app displays generated images but does not include a watermark or an easy option for users to download the images.
Adding a watermark and a download button would improve usability and help with attribution of generated content.
Expected Behavior
1. Generated images should automatically include a watermark (e.g., app name or logo) in a corner of the image.
2. A download button should be available so users can easily save the generated image to their device.
Possible Implementation
• Use PIL (Python Imaging Library) to overlay a watermark on the generated image before displaying it.
• Add a Gradio download button component below the generated image.
Example:
from PIL import Image, ImageDraw, ImageFont
def add_watermark(image):
draw = ImageDraw.Draw(image)
text = "Generated by AppName"
draw.text((10, image.height-30), text, fill=(255,255,255))
return image
Benefits
• Protects generated content with attribution
• Improves user experience
• Makes it easier for users to save images
Additional Context
This feature would be useful for projects using the Gradio interface for AI image generation tools.
I Would like to work on this feature if the maintainers approves it.