jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:
my $photofiletmp; foreach my $item (@photos) { $countphotos++; $photofiletmp = $dirphoto . '/' . 'photo' . $countphotos . '.tmp'; if ($item) { open SAVE, '>', $photofiletmp or die $!; while (<$item>) { print SAVE $_; } my($image, $x); $image = Image::Magick->new; $x = $image->Read($photofiletmp); my ($ox,$oy) = $image ->Get('width','height'); my $r = ($oy * 180) / $ox; $r = sprintf ( "%d", $r ); $x = $image->Resize(width=>180,height=>$r); my $photofile = $dirphoto . '/' . 'photo' . $countphotos . '.jpg +'; $x = $image->Write("$photofile"); unlink $photofiletmp; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Image::Magick not printing full image
by pc88mxer (Vicar) on Mar 19, 2008 at 19:08 UTC | |
by jonnyfolk (Vicar) on Mar 19, 2008 at 19:19 UTC |