On Thu, 12 Feb 2009 14:13:05 +0000
Nick Batt <[email protected]> wrote:
>Hi there, I¹m new here and have just discovered the powere of ImageMagick
>awesome.
>
>Anyhow I don¹t really understand the syntax of the command line usage.
>
>What I¹m trying to do, is take an overlay, add it to an image in the top
>left, then also add an annotation in the bottom and save the output as a
>single file original size, in a single process, but I just don¹t get how to
>stack the commands up so I can do this.
>
>I¹m probably missing the bleedin¹ obvious as is usually the case when I try
>and pick up a new technology but I can only ask...
>Thanks in advance.
>
>Nick
I have trouble stringing the commandline utilities together myself. :-)
So until a util guru answers, here is a Perl script to do it. ( No error
checking
for size of images and text size)
#!/usr/bin/perl
use warnings;
use strict;
use Image::Magick;
#usage: script baseimage overlayimage 'some text in quotes'
my $image = Image::Magick->new;
my $oimage = Image::Magick->new;
my $rc = $image->Read(shift);
$rc = $oimage->Read(shift);
my $text = shift;
$rc = $image->Composite(
geometry => '+30+30',
compose=>'Atop',
image => $oimage,
opacity => '100%',
tile => 0,
);
$image->Annotate(pointsize => 36,
fill => '#ffcc00ff', #last 2 digits opacity in hex ff=max
text => $text,
gravity => 'South' );
$image->Write("$0.png");
exit;
__END__
zentara
--
I'm not really a human, but I play one on earth.
http://www.zentara.net/~zentaran/My_Petition_to_the_Great_Cosmic_Conciousness.html
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users