Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
list($width, $height, $type, $attr) = @getimagesize($thumbpath);
$max_dim = $width;
if ($height > $max_dim) { $max_dim = $height; }
if (!file_exists($thumbpath) ||
($thumb_config['filename_prefix'] == '' && !$config['square_thumbs'] && $thumb_config['size'] != $max_dim) ||
($thumb_config['filename_prefix'] == '' && !$config['square_thumbs'] && $width == $height) ||
($thumb_config['filename_prefix'] == '' && $config['square_thumbs'] && $width != $height) ||
($thumb_config['filename_prefix'] != '' && $thumb_config['size'] != $max_dim) ||
($thumb_config['filename_prefix'] == '' && $config['square_thumbs'] && $thumb_config['size'] != $height && $thumb_config['size'] != $width)) {
$phpThumb = new phpThumb();
// set data
$phpThumb->setSourceFileName($source_file_name);
// $phpThumb->w = $thumb_config['size'];
$phpThumb->q = $config['compression'];
// set zoom crop flag to get image squared off
if ($thumb_config['filename_prefix'] == '' && $config['square_thumbs']) {
$phpThumb->zc = 1;
$phpThumb->h = $thumb_config['size'];
$phpThumb->w = $thumb_config['size'];
} else {
list($w, $h, $t, $a) = @getimagesize($source_file_name);
if ($w > $h) {
$phpThumb->w = $thumb_config['size'];
} else {
$phpThumb->h = $thumb_config['size'];
}
}
$phpThumb->config_use_exif_thumbnail_for_speed = false;
// // Set image height instead of width if not using square thumbs
// if (!$config['square_thumbs']) {
// $phpThumb->h = $thumb_config['size'];
// $phpThumb->w = '';
// }
1 to 4 of 4