There are many softwares available out there, but I was wondering if I could do it myself easily. After some research and goggling, I think I can just use Perl to process all my photos at once with the help of the ImageMagick since I have it installed in my Vista Premium already.
Here are the simple steps to produce the watermark photos:
- Install Gimp or Photoshop or any image processing software to create your own digital watermark such as the following:

- Install ActivePerl in your Windows OS. If you are using Linux/Unix, you may already have it installed.
- Install ImageMagick.
- Then copy the following perl script using a text editor to a file named "transfer.pl".
#!/usr/bin/perl -w
#Change your settings here
$targetFolder = "converted";
$targetFilePattern = "conv";
$watermark = "C:\\Temp\\watermark.png";
$imageExt = "JPG";
$i = 1;
opendir(DIR, ".");
@files = grep(/\.$imageExt$/,readdir(DIR));
closedir(DIR);
mkdir($targetFolder);
foreach $file (@files) {
$targetFile = "$targetFolder\\$targetFilePattern".($i++).".$imageExt";
$cmd = "composite -dissolve 50% -gravity SouthEast -geometry +5+5 $watermark $file $targetFile";
print "Converting $file to $targetFile\n";
system($cmd);
} - Change the setting in the script, e.g. target folder name, target file pattern, watermark picture file location and the source photo file type.
- Copy the file to your folder which contains the photos to convert and execute it by "perl transfer.pl".

No comments:
Post a Comment