Watermarking image files and setting copyright information

How you do watermarking depends on whether your logo or image that you want to use for watermarking has an alpha channel (Transperancy) or not. If you wish to add an alpha channel using iMagine Photo to your watermark then you can see how to do this on the transparency page.

In the following examples I will be scaling the watermark to fill as much of the image as possible without stretching or allowing the watermark to extend beyond the edges of the image.

The following script blends a watermark with your image file and creates a new image with the watermark applied. In Panther to open the script in a new Script Editor window click here.

The simplest variation on the above script is the ability to take advantage of the alpha channel. Note that not all image formats support alpha channel functionality, the most commonly used format is PNG because PNG files can be viewed by most web browsers. To modify the above script for blending a watermark with an alpha channel all you have to do is to replace the following line in the script above:

with this line:

If the alpha channel contains all the blending/transparency information that you need then remove all the lines in the above script which have amountToBlend in them and replace the drawing mode line as in the previous change with

It is not necessary that the watermark covers as much of the original picture as possible, it is only that I have designed the scripts above to do that.

The following script sets the exif copyright and artist information in the image. The script replaces the contents of the original file. To find out more about reading and writing exif information and other properties of image files see the Read/Write Exif metadata page. In Panther to open the script in a new Script Editor window click here.

The page Preparing for the internet includes scripts that combine applying watermarks and the copyright information as well as other actions relevant to preparing files for the internet. The script is called AllSingingAllDancingDroplet because it performs all the relevant operations related to preparing image files for the internet.

The ability to open scripts in a new Script Editor window is provided by a little script called "Convert Script to Markup Code" and can be obtained from http://homepage.mac.com/jonn8/as/

keywords: AppleScript, Apple Script, jpeg, jpg, image, graphic, Macintosh, watermarking, copyright, exif.