public static function getImageSize($filename, $returnString = 0, $extLink = 0)
{
phocagalleryimport('phocagallery.image.image');
phocagalleryimport('phocagallery.path.path');
if ($extLink == 1) {
$fileNameAbs = $filename;
} else {
$path = PhocaGalleryPath::getPath();
$fileNameAbs = Path::clean($path->image_abs . $filename);
if (!File::exists($fileNameAbs)) {
$fileNameAbs = $path->image_abs_front . 'phoca_thumb_l_no_image.png';
}
}
if ($returnString == 1) {
$imageSize = @getimagesize($fileNameAbs);
return $imageSize[0] . ' x ' . $imageSize[1];
} else {
return @getimagesize($fileNameAbs);
}
}