Neos.Media/Classes/Domain/Model/Image.php
protected function calculateDimensionsFromResource(PersistentResource $resource)
    {
        try {
            $imageSize = $this->imageService->getImageSize($resource);
        } catch (ImageFileException $imageFileException) {
            throw new ImageFileException(sprintf('Tried to refresh the dimensions and meta data of Image asset "%s" but the file of resource "%s" does not exist or is not a valid image.', $this->getTitle(), $resource->getSha1()), 1381141468, $imageFileException);
        }

        $this->width = is_int($imageSize['width']) ? $imageSize['width'] : null;
        $this->height = is_int($imageSize['height']) ? $imageSize['height'] : null;
    }
protected function calculateDimensionsFromResource(PersistentResource $resource)
    {
        try {
            $imageSize = $this->imageService->getImageSize($resource);
        } catch (ImageFileException $imageFileException) {
            throw new ImageFileException(sprintf('Tried to refresh the dimensions and meta data of Image asset "%s" but the file of resource "%s" does not exist or is not a valid image.', $this->getTitle(), $resource->getSha1()), 1381141468, $imageFileException);
        }

        $this->width = is_int($imageSize['width']) ? $imageSize['width'] : null;
        $this->height = is_int($imageSize['height']) ? $imageSize['height'] : null;
    }
protected function calculateDimensionsFromResource ( PersistentResource $ resource ) { try { $ imageSize = $ this -> imageService -> getImageSize ( $ resource ) ; } catch ( ImageFileException $ imageFileException ) { throw new ImageFileException ( sprintf ( 'Tried to refresh the dimensions and meta data of Image asset "%s" but the file of resource "%s" does not exist or is not a valid image.' , $ this -> getTitle ( ) , $ resource -> getSha1 ( ) ) , 1381141468 , $ imageFileException ) ; } $ this -> width = is_int ( $ imageSize [ 'width' ] ) ? $ imageSize [ 'width' ] : null ; $ this -> height = is_int ( $ imageSize [ 'height' ] ) ? $ imageSize [ 'height' ] : null ; }
Calculates and sets the width and height of this Image asset based
on the given PersistentResource.

@param PersistentResource $resource
@return void
@throws ImageFileException
Calculates and sets the width and height of this Image asset based on the given PersistentResource .