<a class="lightbox" href="big_image.png">
<img src="small_image.png" alt="">
</a>
// resize file
$image = new Image($folder.'/'.$fileName);
$image->resize(param('maxWidthBigThumb', 800), param('maxHeightBigThumb', 600));
$image->save($gallery->uploadBigThumbPath.'/'.$fileName);
// create thumb
$image->resize(param('maxWidthMediumThumb', 400), param('maxHeightMediumThumb', 300));
$image->save($gallery->uploadMediumThumbPath.'/'.$fileName);
$image->resize(param('maxWidthSmallThumb', 100), param('maxHeightSmallThumb', 75));
$image->save($gallery->uploadSmallThumbPath.'/'.$fileName);
$pathInfo = pathinfo($fileName);
if ($pathInfo['extension'] == 'gif') {
///
///здесь используете ImageMagick для ресайза gif
///
}
else {
// resize file
$image = new Image($folder.'/'.$fileName);
$image->resize(param('maxWidthBigThumb', 800), param('maxHeightBigThumb', 600));
$image->save($gallery->uploadBigThumbPath.'/'.$fileName);
// create thumb
$image->resize(param('maxWidthMediumThumb', 400), param('maxHeightMediumThumb', 300));
$image->save($gallery->uploadMediumThumbPath.'/'.$fileName);
$image->resize(param('maxWidthSmallThumb', 100), param('maxHeightSmallThumb', 75));
$image->save($gallery->uploadSmallThumbPath.'/'.$fileName);
}
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 6