Nie wiem jak mam się do tego zabrać , mam katalog a w nim zdjęcia chciałby m zrobić skrypt który na podstawie zdjęć w katalogu stworzy miniaturki,
wyznacznikiem czy ma zrobić będzie np szerokość minimalna
<?php $default_dir = "zdjecia/"; { } else { { if($file != '.' && $file != '..' ) { $nowe ="zdjecia/"; $zdjecie = "zdjecia/$file"; $quality = "65"; $imagewidth = $imagedata[0]; $imageheight = $imagedata[1]; $imagetype = $imagedata[2]; $shrinkage = "1"; $dest_height = "75"; $dest_width = "100"; $sciezkan="zdjecia/pojazdy/"; $src_img = imagecreatefromjpeg($zdjecie); $dst_img = imageCreateTrueColor($dest_width, $dest_height); ImageCopyResampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $imagewidth, $imageheight); imagejpeg($dst_img,$nowe."ma_".$nazwanowa, $quality); imagedestroy($src_img); imagedestroy($dst_img); } } } } ?>
<?php $file_ext = $path_parts['extension']; if($file_ext == "jpg") { } else { } ?>
<?php $default_dir = "zdjecia/"; { } else { { $file_ext = $path_parts['extension']; if($file != '.' && $file != '..' && $file_ext == "jpg") { $nowe ="zdjecia/"; $zdjecie = "zdjecia/$file"; $quality = "65"; $imagewidth = $imagedata[0]; $imageheight = $imagedata[1]; $imagetype = $imagedata[2]; $shrinkage = "1"; $dest_height = "75"; $dest_width = "100"; $sciezkan="zdjecia/pojazdy/"; $src_img = imagecreatefromjpeg($zdjecie); $dst_img = imageCreateTrueColor($dest_width, $dest_height); ImageCopyResampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $imagewidth, $imageheight); imagejpeg($dst_img,$nowe."ma_".$nazwanowa, $quality); imagedestroy($src_img); imagedestroy($dst_img); } } } } ?>
<?php } else { } ?>