Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Image Watermark to Images using Java
// Add PNG Image Watermark to JPG using Java
ImageWatermark watermark = new ImageWatermark(Constants.Watermark_PNG);
watermark.setX(20);
watermark.setY(80);
// Add watermark to the source JPG Image and save the output
Watermarker watermarker = new Watermarker(Constants.JPG_IMAGE);
watermarker.add(watermark);
watermarker.save(Constants.JPG_IMAGE_OUTPUT);
watermark.close();
watermarker.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.