My girlfriend recently started a photography business. I found her uploading her photos to Facebook or her website with her logo in the bottom right of the image. She would use Photoshop to do this manually but the work really started when there were quite a few photos to do this to.
I know there are batch processes in Photoshop but this can be quite slow depending on what you’re doing. Photoshop seems to show you the running batch process which uses up a lot of CPU rending the changes on screen. As she’s lucky enough to have me for a boyfriend, I thought I would help out by writing a little script she could use to do this for her.
The class takes a predefined logo and sticks it on the image, saves it and moves on to the next one. There are two versions of the logo, one to be used on a light background, the other to be used on a dark background:
View the class on GitHub: https://github.com/olivertappin/watermark/blob/master/watermark.php
To use the code:
// Create a new instance of the Watermark class $watermark = new Watermark(); // Set the input directory (where the images are located) $watermark->setInputDirectory('input'); // Set the output directory (where the files will be saved) $watermark->setOutputDirectory('output'); // Run the script $watermark->run();