为什么我在上传到 FTP 服务器时总是收到损坏的图像文件?.gif
图像不会损坏,只有.jpeg
/jpg
会.png
损坏。
sub png{
my $ftp=Net::FTP->new($fhost)or die &ftpErr;
$ftp->login($hostname, $hostpass);
my $img=$ftp->put("$file");
$ftp->get($img);
$ftp->quit;
our $image="$img";
our $shot=$window->Photo(-format=>'png',-file=>"$image");
$window->Label(-relief=>'ridge',-image=>$shot,-width=>50,-height=>50)->pack(-anchor=>'n');
}
sub jpeg{
my $ftp=Net::FTP->new($fhost)or die &ftpErr;
$ftp->login($hostname, $hostpass);
my $img=$ftp->put("$file");
$ftp->get($img);
$ftp->quit;
our $image="$img";
our $shot=$window->Photo(-format=>'jpeg',-file=>"$image");
$window->Label(-relief=>'ridge',-image=>$shot,-width=>50,-height=>50)->pack(-anchor=>'n');
}