I'm creating a website which requires the images in the site's Gallery to be watermarked. I'd prefer the watermark to get added programatically when the image gets uploaded to the application (via it's web interface) than to manually add it before we do the upload.
Are there any simple ways (perhaps an image library?) that will allow me to do this?
I'm building the site in Grails, so a Groovy or Java solution would be great.
This is the code you want I think...
BufferedImage source = ...;
BufferedImage watermark = ...;
Graphics2D g = source.createGraphics();
g.drawImage(watermark, x, y, null);
g.dispose();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With