P
PowerBookGrafik
Aktives Mitglied
Thread Starter
- Dabei seit
- 12.03.2005
- Beiträge
- 814
- Reaktionspunkte
- 5
Hello Leute, hab ein Problem , hab das script hier aus dem Forum :
PHP-Code:
jetzt ladet es das verkleinerte file in /small/ ... ohne probs ...
jetzt will ich aber noch das das original file also das große in
../img/printproduktions/ landet
wie mache ich das ?
PHP-Code:
PHP:
function mkThumb($jpgFile) {
list($width_orig, $height_orig) = getImageSize($jpgFile);
$height = 100;
$width = (int)($width_orig * ($height / $height_orig));
$image_in = imagecreatefromjpeg($jpgFile);
$image_out = imagecreatetruecolor($width, $height);
imagecopyresampled($image_out, $image_in, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagejpeg($image_out, substr($jpgFile, 0, strlen($jpgFile) - 4).".jpg", 100);
imagedestroy($image_in);
imagedestroy($image_out);
}
if (isset($_FILES['pic'])) {
chdir('../img/printproduktions/small/');
if (move_uploaded_file($_FILES['pic']['tmp_name'], $_FILES['pic']['name'])) {
mkThumb($_FILES['pic']['name']);
# einkommentieren, wenn original geloescht werden soll
# oder heisst's aus-kommentieren...?
//unlink($_FILES['pic']['name']);
} else {
die('Trouble with image file...');
}
}
jetzt will ich aber noch das das original file also das große in
../img/printproduktions/ landet
wie mache ich das ?