Hi there, I have 189 gif images at 200x200 and I want to combine them in a 3x61 arrangement, ending up with a 600x12200 gif. Firstly is this just crazy talk? I realise this is a large image, but I've dealt with larger in the past.
Secondly, what the hell am I doing wrong!? My code is below. I have the image filenames in a file. The first bit of the code grabs the filenames (all 8 characters long) and sticks them into @images. After this, it all gets a bit hazy. When I run the code, it gets as far as "Montaging...\n" but then hangs (12 hours and counting) whle the CPU usage goes through the roof. I used the code from here to create mine: http://savage.net.au/ImageMagick.html#ImageMagick_Hax_1_13 I would appreciate any pointers to where I'm going wrong, and also pointers to any documentation that might help me understand this better. Cheers, James ########################################################### #!/usr/bin/perl use warnings; use strict; use Image::Magick; my @images; my $input_file = '/home/james/montage_images/amalgam.txt'; my $output_file = 'home/james/montage_images/montage.gif'; my $image_dir = '/home/james/montage_images/'; my $result; open IN, "<$input_file" or die "Couldn't read $input_file: $!\n"; while (<IN>) { chomp; if (/([A-Z0-9]{8}\.gif)/){ push (@images, $1); } } my($image) = Image::Magick -> new(); my($stack) = Image::Magick -> new(); my $counter = 1; for (1..63) { # I know I don't need these for now, for (1..3) { # I'm going to need them later. my $tile = pop @images; $result = $image -> Read("$image_dir"."$tile"); warn $result if $result; push (@$stack, $image); print "$tile added to array ($counter)\n"; $counter++; } } print "Montaging...\n"; my($final) = $stack -> Montage ( tile => '3x63', geometry => '200x200' ); $result = $final -> Write($output_file); warn $result if $result; print "Success. Wrote $output_file. \n"; The information contained in this e-mail is intended for the recipient or entity to whom it is addressed. It may contain confidential information that is exempt from disclosure by law and if you are not the intended recipient, you must not copy, distribute or take any act in reliance on it. If you have received this e-mail in error, please notify the sender immediately and delete from your system. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>