Back to PhocaGalleryImage class

Method getRealImageSize

public static
getRealImageSize
(mixed $filename, mixed $size = 'large', mixed $extLink = 0)

Method getRealImageSize - Source code

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;
}