Linux Tweaks, HowTo's and Reviews

I recently discovered that one of my most popular posts had been poached by another blog with out providing credit - images and all. I decided that it would be best to watermark my images to make it more difficult to rip off my content.

This procedure could also be done easily in GIMP, but it takes time to open up each image and then import or create the watermark text. Instead I created my desired watermark text in GIMP and saved it as a separate file called Watermark.png. This file has a transparent background, so only the text will show up when it's overlaid on another image.

A little explanation of the command we performed. composite is the command to combine two images. The dissolve 50% switch tells ImageMagick to make the overlay image 50% transparent. The gravity center switch tells it to center the overlay image on the base image.

As you can see above, my watermark image is too large compared to the image of Tux. I'll need to shrink it in order for the result to look how I want. Now, I could go into GIMP and resize my watermark image, but ImageMagick provides an easy way to do this on the fly. With a slight modification to the above command I can scale down the watermark before it's overlaid.

That looks a little bit better. Note that these commands have created a new image called Tuxwm.jpg. You can make the command overwrite the original image if you just pass the same file name at the end of the command like this.

Unfortunately this does not work for me. In Ubuntu 9.1, I tried composite -gravity center image1.png image2.gif outputimage.jpg. However, I get " unable to open image `temp.png': No such file or directory @ blob.c/OpenBlob/2439.

iggykoopa - Thanks for the link. I'm working on a similar script. It's always interesting to see how someone else goes about doing things. I've been playing around with Zenity, but haven't really done much with it yet. Something I struggle with is deciding how much to hard code into the script vs. presenting options to the user. For myself, I like things hard coded in since it makes things quicker for me when I run the script, but I know that is not the most desirable way for many users.