Techno Blender
Digitally Yours.

Easy Watermark: Protect Your Work | Harlan Brothers

0 47


This simple, versatile notebook can help you maintain attribution for your graphics and AI artwork. It can even embed secret data.

AI-generated image of a lake with waterfalls, rocks, tress, and clouds. It has a light watermark in the center that reads “My Subtle Watermark.”
“Watermark” with a deliberately visible watermark that was generated by the Colab notebook referenced in this article. (Image by Author using Stable Diffusion)

T o watermark or not to watermark, that is the question. Alas, there’s no simple answer. You’ve spent countless hours refining your data visualization or artwork to share online. Perhaps you want to help establish copyright ownership, discourage unattributed reuse of your work, or simply gain name recognition. On the other hand, you might be reticent to mar your wonderful work with possibly unsightly text.

Either way, this notebook is for you! Here’s a quick rundown.

The first two code blocks will download a selection of fonts from Font Squirrel, mount your Google Drive, and create directory for the images you want to watermark. You’ll then come to this form:

Formatting parameters for watermark notebook.

1) Using the Files pane, hover over an uploaded file in MyDrive/Uploads and press the 3 vertical dots. Copy the path and paste it into the “path” field:

How to copy the image path.

2) Add your name, pseudonym, or secret message (more on that in a bit) to the “watermark” field.

3) Choose a font from the drop-down menu, and enter the font size.

4) You can position your watermark using the “xCoor” and “yCoor” variables. The point (0, 0) is located in the upper left corner of the image (unlike the usual Cartesian coordinates, positive y is down).

5) The default color palette for text is grayscale and is determined by the variable “grayVal.” For colored text, replace the “grayVal” entries in the “textColor” field with individual RGB values (e.g., (42, 70, 99)).

6) Set the “opacity.” The scale runs from 0 (transparent) to 255 (opaque).

7) Run the code block.

That’s it. The notebook will automatically download the watermarked image and also preview it so that you can tweak things without having to open the downloaded image.

Using this tool, you can be as bold or subtle as you like. With a low opacity and judicious use of font size and color, your watermark can be virtually invisible, yet sufficient for the purpose of establishing ownership of your image.

For example, let’s say I’ve come up with a nice visualization for an article about where Millennials are likely to be renting in the future (see Figure 1). Given the popularity of posts about trends in the housing market, I figure that once it’s online, some bloggers (or auto bloggers) out there are likely to “borrow” my insight and appropriate the graphic with a 50/50 chance of proper attribution.

So, I upload my 1600 x 1200 image to Google Drive and run the watermarker. After quickly previewing a few different locations, I decide that (852, 950) with the 20pt, OpenSans-Regular font and an opacity of 192 is just right — not obtrusive, but visible enough to show my authorship.

Figure 1. Watermarked graphic representing the predicted popularity of Millennial rental markets for select cities. (Image by Author)

In fact, because you can be a subtle as you’d like, you can even use the notebook to explore the field of image steganography — the practice of concealing information in plain sight. For example, here are two seemingly identical images:

AI-generated image of assorted large rocks in dark gray sand.
Original image. (Image by Author)
Watermarked image. (Image by Author)

Here’s what happens when we subtract the original image (top) from the watermarked image (bottom) and apply gamma correction and binarization:

Steganographic data retrieved from the watermarked image above. (Image by Author)

So go ahead — lay claim your intellectual property, promote your brand, or just have fun with steganography. You can download or open the Colab notebook directly from GitHub. Enjoy!


This simple, versatile notebook can help you maintain attribution for your graphics and AI artwork. It can even embed secret data.

AI-generated image of a lake with waterfalls, rocks, tress, and clouds. It has a light watermark in the center that reads “My Subtle Watermark.”
“Watermark” with a deliberately visible watermark that was generated by the Colab notebook referenced in this article. (Image by Author using Stable Diffusion)

T o watermark or not to watermark, that is the question. Alas, there’s no simple answer. You’ve spent countless hours refining your data visualization or artwork to share online. Perhaps you want to help establish copyright ownership, discourage unattributed reuse of your work, or simply gain name recognition. On the other hand, you might be reticent to mar your wonderful work with possibly unsightly text.

Either way, this notebook is for you! Here’s a quick rundown.

The first two code blocks will download a selection of fonts from Font Squirrel, mount your Google Drive, and create directory for the images you want to watermark. You’ll then come to this form:

Formatting parameters for watermark notebook.

1) Using the Files pane, hover over an uploaded file in MyDrive/Uploads and press the 3 vertical dots. Copy the path and paste it into the “path” field:

How to copy the image path.

2) Add your name, pseudonym, or secret message (more on that in a bit) to the “watermark” field.

3) Choose a font from the drop-down menu, and enter the font size.

4) You can position your watermark using the “xCoor” and “yCoor” variables. The point (0, 0) is located in the upper left corner of the image (unlike the usual Cartesian coordinates, positive y is down).

5) The default color palette for text is grayscale and is determined by the variable “grayVal.” For colored text, replace the “grayVal” entries in the “textColor” field with individual RGB values (e.g., (42, 70, 99)).

6) Set the “opacity.” The scale runs from 0 (transparent) to 255 (opaque).

7) Run the code block.

That’s it. The notebook will automatically download the watermarked image and also preview it so that you can tweak things without having to open the downloaded image.

Using this tool, you can be as bold or subtle as you like. With a low opacity and judicious use of font size and color, your watermark can be virtually invisible, yet sufficient for the purpose of establishing ownership of your image.

For example, let’s say I’ve come up with a nice visualization for an article about where Millennials are likely to be renting in the future (see Figure 1). Given the popularity of posts about trends in the housing market, I figure that once it’s online, some bloggers (or auto bloggers) out there are likely to “borrow” my insight and appropriate the graphic with a 50/50 chance of proper attribution.

So, I upload my 1600 x 1200 image to Google Drive and run the watermarker. After quickly previewing a few different locations, I decide that (852, 950) with the 20pt, OpenSans-Regular font and an opacity of 192 is just right — not obtrusive, but visible enough to show my authorship.

Figure 1. Watermarked graphic representing the predicted popularity of Millennial rental markets for select cities. (Image by Author)

In fact, because you can be a subtle as you’d like, you can even use the notebook to explore the field of image steganography — the practice of concealing information in plain sight. For example, here are two seemingly identical images:

AI-generated image of assorted large rocks in dark gray sand.
Original image. (Image by Author)
Watermarked image. (Image by Author)

Here’s what happens when we subtract the original image (top) from the watermarked image (bottom) and apply gamma correction and binarization:

Steganographic data retrieved from the watermarked image above. (Image by Author)

So go ahead — lay claim your intellectual property, promote your brand, or just have fun with steganography. You can download or open the Colab notebook directly from GitHub. Enjoy!

FOLLOW US ON GOOGLE NEWS

Read original article here

Denial of responsibility! Techno Blender is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – [email protected]. The content will be deleted within 24 hours.

Leave a comment