Thanks Ron for your advice! I am taking it, but first I had a simple
(I hope!) PerlMagick question.
I have an AVI file which I am reading in PERL. I wish to do a
composite of the first x many frames and do that for the rest of the
AVI file until I've gone through the whole thing.
My questions is how do I take a slice of the array images such that I
have n many frames to put together?
Right now, I am using Append (which I think is wrong), but I can not
find a way to make a multi-image array that PerlMagick likes unless it
Reads it all from files.
Thanks!
Here is my PERL code:
my $whichFrame = 0;
my $startFrame = 0;
while ($images->[$whichFrame]) {
$ave_images = Image::Magick->new;
$ave_images = $images->[$whichFrame];
$whichFrame++;
for (my $x = 1; ($x < $limit) && ($images->[$whichFrame]); $x++) {
print "Image ".$whichFrame."\r";
$ave_images->Append ($images->[$whichFrame]);
$whichFrame++;
}
print "\nWriting...\n";
my $new_image = Image::Magick->new;
$new_image = $ave_images->[0];
for (my $x = 1; $ave_images->[$x]; $x++) {
$rc = $new_image->Composite (image=>$ave_images->[$x], compose=>'add');
warn "$rc" if "$rc";
}
$new_image->Set (quality=>100);
$new_image->Negate ();
$rc = $new_image->Write
("jpg:AVERAGES/$rootname/average-$startFrame-$whichFrame.jpg");
warn "$rc" if "$rc";
$startFrame = $whichFrame;
undef $new_image;
undef $ave_images;
}
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users