if ($cmd eq "add")
{
get "Id==$_put_last{Id}","foto_foto";
# mod "Id==$_put_last{Id}", ["Thumb","Thumb"], "foto_foto";
$nummer=$_put_last{Id};
$pic=$Bild;
($x,$y,$size,$comm)=get ["width","height","filesize","comment"],"_files/$pic";
out "Info: $x - $y - $size - $comm<br>";
$faktor=$x/450;
$faktor_th=$x/100;
out "Faktor: $faktor<br>";
$neu="xxx_foto_$nummer.jpg";
$thumb="th_xxx_foto_$nummer.jpg";
$pfad="http://xxx.de/page/logo-klein.jpg";
# mod "Copy",{target=>$neu},"_files/$pic";
mod "Copy",{target=>$thumb},"_files/$pic";
mod "Rename",{target=>$neu},"_files/$pic";
mod "Id==$nummer", ["Bild",$neu,"Thumb","$thumb"], "foto_foto";
my @aktionen;
push (@aktionen,["resize",{width=>int($x/$faktor),height=>int($y/$faktor)}]);
push (@aktionen,["Rename",{target=>$neu}]);
my @aktionen_th;
push (@aktionen_th,["resize",{width=>int($x/$faktor_th),height=>int($y/$faktor_th)}]);
push (@aktionen_th,["Rename",{target=>$thumb}]);
mod @aktionen_th,"_files/$thumb";
out "Bild wurde skaliert und Vorschaubild erstellt!<br><img src=\"http://www.xxx.de/files/$neu\"><br>Bildname: $neu";
mod "Id==$nummer", ["Bild",$neu,"Thumb","$thumb"], "foto_foto";
}