Page 1 of 1

Little syntax problems

Posted: 2015-06-05T09:33:23-07:00
by domx
Sow... Hello guys. I haven't found helpful things via google, or the forum search, so I'll ask direktly

I've written a nice bash skript. Now I'm translating it to Perl. Most of this is no problem, but the API for PerlMagick gets me crazy...
I've tried the most of for the things, but three things don't run... I'm very frustrated, after one and a half day searching and trying...

How to do these things with PerlMagick?

1st: convert -size ${1}x$2 xc:black +repage "$WDir/BG/image.png" # creates image.png, with black background and through variables set resolution

2nd: composite $1 -gravity Center +repage "$WDir/BG/image.png" $2 # creates $2, where $1 lays on image.png (Two layers combined)

3rd: convert ${hor[*]} +append +repage "$WDir/matrix/mat${Y}.png" # something like you can see here:

Generally on the beginning:
$image = Image::Magick->new;

Some things I already tried
1st: Sounds to me to create images, but don't work
$image->Montage(geometry=>'160x160', background=>'rgb(0,0,0)');

2nd: sounds all to be to do this. But if, I don't get the exact syntax
$image->Flatten(??); <- how to use?!

3rd: How to initialize it, to append these two side-by-side?

Generally after:

All was also tried with Transform(); .