rock6.jpg
Software error:
Can't call method "Flatten" on an undefined value at uploadv25.pl line 232.
####
print $filename;
$localfile = $filename;
$localfile =~ m/(.*)\.(.*)/;
$newfilename = "$thumbdir/$1.png";
my ($image, $x);
$image=Image::Magick->new;
$image->BlobToImage($localfile);
$image = $image->[0];
$image->Flatten();
#$x = $image->Read($localfile);
warn "$image" if "$image";
$x = $image->Resize(width=>100, height=>100);
$x = $image->Write($newfilename);
warn "$x" if "$x";
####
open( SAVED, ">>$localfile" ); # || die $!;
while ( $bytesread = read( $remotefile, $buffer, 1024 ) ) {
print SAVED $buffer;
}
close SAVED;