I have two images (the first one is big and the second one is small and transparent). I need to add the second image at the center of the first image and save the result as a new file.
How to do it with Perl Image::Magick?
I have two images (the first one is big and the second one is small and transparent). I need to add the second image at the center of the first image and save the result as a new file.
How to do it with Perl Image::Magick?
use strict;
use warnings;
use Image::Magick;
my $big = Image::Magick->new;
$big->Read(filename => 'big.png');
my $little = Image::Magick->new;
$little->Read(filename => 'little.png');
$big->Composite(image => $little, qw(compose SrcAtop gravity Center));
$big->Write(filename => 'out.png');