-
You should prepare your image with logo. We can advise you to do something not very big and not very colorful. Also we will recommend to use transparent background for this image. Preferably this image should be smaller than any of your images you want to mark.
-
Copy this program into your Perl script:
use Image::Magick;
# initiate Image::Magick objects for your images
my $img = Image::Magick->new;
my $logo = Image::Magick->new;
# read image for marking and watermark
$from->Read("image-from.jpg");
$logo->Read("logo.gif");
# blend two images
$foto->Composite
(
compose=>'blend',
blend=>'50x50',
x=>'50', y=>'50',
image=>$logo,
);
# save final result
$img->Write("image-to.jpg");
-
Run your Perl script and enjoy
-
For better appearance, you can play with blend=>'50x50' parameter for better balance between logo and image
-
Find the best placement of watermark logo with x=>'50', y=>'50' parameters.
-
For placement of your logo in the center of the image you either can accurately calculate coordinates, or use parameter gravity=>'Center' instead of x=>'50', y=>'50' parameters.