getImageSize() public méthode

Get the size of a Flow PersistentResource that contains an image file.
public getImageSize ( PersistentResource $resource ) : array
$resource Neos\Flow\ResourceManagement\PersistentResource
Résultat array width and height as keys
 /**
  * Calculates and sets the width and height of this Image asset based
  * on the given PersistentResource.
  *
  * @param PersistentResource $resource
  * @return void
  * @throws ImageFileException
  */
 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;
 }