public static function getRealImageSize($filename, $size = 'large', $extLink = 0)
{
phocagalleryimport('phocagallery.file.thumbnail');
if ($extLink == 1) {
list($w, $h, $type) = @getimagesize($filename);
} else {
$thumbName = PhocaGalleryFileThumbnail::getThumbnailName($filename, $size);
list($w, $h, $type) = @getimagesize($thumbName->abs);
}
$sizeA = array();
if (isset($w) && isset($h)) {
$sizeA['w'] = $w;
$sizeA['h'] = $h;
} else {
$sizeA['w'] = 0;
$sizeA['h'] = 0;
}
return $sizeA;
}