= $offset) { $files[] = $_SESSION["lightroomFiles"][$i]; } ++$count; } } function createthumb($name, $filename, $new_w, $new_h) { $system = explode('.', $name); if (preg_match('/jpg|jpeg/', $system[1])) { $src_img = imagecreatefromjpeg($name); } if (preg_match('/png/', $system[1])) { $src_img = imagecreatefrompng($name); } if (!$src_img) { link("icons/image.png", $filename); return; } $old_w = imageSX($src_img); $old_h = imageSY($src_img); $old_x = 0; $old_y = 0; if ($old_w > $old_h) { $old_x = ($old_w - $old_h) / 2.0; $old_w = $old_h; } if ($old_w < $old_h) { $old_y = ($old_h - $old_w) / 2.0; $old_h = $old_w; } $dst_img=ImageCreateTrueColor($new_w, $new_h); imagecopyresampled($dst_img, $src_img, 0, 0, $old_x, $old_y, $new_w, $new_h, $old_w, $old_h); if (preg_match("/png/",$system[1])) { imagepng($dst_img, $filename, 90); } else { imagejpeg($dst_img, $filename, 90); } imagedestroy($dst_img); imagedestroy($src_img); } ?> Gallery
Lightroom
Zurück
"; for($i = 0; $i < count($files); $i++) { if ($i%3 == 0) echo ""; echo ""; } echo ""; } ?>
"; $thumbnail = "thumbnails/".md5($files[$i])."jpg"; if (!file_exists($thumbnail)) createthumb($files[$i], $thumbnail, 250, 250); echo "
"; echo ""; echo "
"; echo "
"; echo "
0) { $tmp = $offset - $maxCount; if ($tmp < 0) $tmp = 0; echo "<"; } if (($count > $offset + $maxCount) || ($offset > 0)) echo "  -  "; if ($count > $offset + $maxCount) echo ">"; ?>