PerlMagick syntax Composite

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
zemlik
Posts: 38
Joined: 2014-03-05T06:12:01-07:00
Authentication code: 6789

PerlMagick syntax Composite

Post by zemlik »

sorry put this on other board in error

hello,
I don't do this very often.
have an array of images and pixel coordinates.
would like to combine over another image at those coordinates.
not understanding the syntax
something like

Code: Select all


$y=0;
while ($y <=  $#frames){
#say $frames[$y][0]; # the backgound
#say $frames[$y][1]; # the x pixel coordinate
#say $frames[$y][2]; # the y pixel coordinate
$base=$frames[$y][0];
$xpix=$frames[$y][1];
$ypix=$frames[$y][2];
$base->Composite(image =>$over, qw(compose ScrAtop geometry $xpix $ypix));
$y+=1;
}
cheers
zemlik
Posts: 38
Joined: 2014-03-05T06:12:01-07:00
Authentication code: 6789

Re: PerlMagick syntax Composite

Post by zemlik »

I dunno if something is messed up.
with

use Image::Magick;

$base->Composite(image=>$over,compose=>'over',geometry=>'+$xpix +$ypix');
there is error
"Uncaught exception from user code:
Can't locate object method "Composite" via package"

----
Debian testing (buster)
I had installed perlmagick with apt and if I try to install
"cpanm Image::Magick"
it fails to make.

are PerlMagick and Image::Magick different things ?

[e]
Ok
"cpanm Image::Magick"
fails because
"fatal error: magick/magick-baseconfig.h: No such file or directory"
it is not in /usr/include/ImageMagick-6/magick

installed
apt-get install libimage-magick-perl
apt-get install perlmagick
apt-get install libmagickcore-dev
apt-get install imagemagick-6-common
apt-get install libmagickcore-6-headers
apt-get install libperl-dev

and still no luck

Is error my system or syntax ?
zemlik
Posts: 38
Joined: 2014-03-05T06:12:01-07:00
Authentication code: 6789

Re: PerlMagick syntax Composite

Post by zemlik »

well I thought somebody might take pity. Is sorted now, I had my quotation marks in a twist.

Code: Select all

$image->Composite(image=>$image2,
            geometry=>"+$x+$y",
            compose=>"over");
doesn't seem to matter that cpanm version fails to install.
Post Reply