‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Type\File\ImageInfo Class Reference
Inheritance diagram for TYPO3\CMS\Core\Type\File\ImageInfo:
TYPO3\CMS\Core\Type\File\FileInfo TYPO3\CMS\Core\Type\TypeInterface

Public Member Functions

int getWidth ()
 
int getHeight ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Type\File\FileInfo
string false getMimeType ()
 
string[] getMimeExtensions ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Type\TypeInterface
string __toString ()
 

Protected Member Functions

array false getExifAwareImageSize (string $imageFile)
 
array getImageSizes ()
 
 getImageSizesFromImageMagick ()
 
false array extractSvgImageSizes ()
 

Protected Attributes

array false null $imageSizes
 

Detailed Description

A SPL FileInfo class providing information related to an image.

Definition at line 27 of file ImageInfo.php.

Member Function Documentation

◆ extractSvgImageSizes()

false array TYPO3\CMS\Core\Type\File\ImageInfo::extractSvgImageSizes ( )
protected

Try to read SVG as XML file and find width and height

Returns
‪false|array

Definition at line 131 of file ImageInfo.php.

Referenced by TYPO3\CMS\Core\Type\File\ImageInfo\getImageSizes().

◆ getExifAwareImageSize()

array false TYPO3\CMS\Core\Type\File\ImageInfo::getExifAwareImageSize ( string  $imageFile)
protected

Gets the image size, considering the exif-rotation present in the file

Parameters
string$imageFile‪The image filepath
Returns
‪array|false Returns an array where [0]/[1] is w/h.

Definition at line 63 of file ImageInfo.php.

Referenced by TYPO3\CMS\Core\Type\File\ImageInfo\getImageSizes().

◆ getHeight()

int TYPO3\CMS\Core\Type\File\ImageInfo::getHeight ( )

Returns the height of the Image.

Returns
‪int

Definition at line 51 of file ImageInfo.php.

References TYPO3\CMS\Core\Type\File\ImageInfo\$imageSizes, and TYPO3\CMS\Core\Type\File\ImageInfo\getImageSizes().

◆ getImageSizes()

◆ getImageSizesFromImageMagick()

TYPO3\CMS\Core\Type\File\ImageInfo::getImageSizesFromImageMagick ( )
protected

Definition at line 111 of file ImageInfo.php.

Referenced by TYPO3\CMS\Core\Type\File\ImageInfo\getImageSizes().

◆ getWidth()

int TYPO3\CMS\Core\Type\File\ImageInfo::getWidth ( )

Returns the width of the Image.

Returns
‪int

Definition at line 40 of file ImageInfo.php.

References TYPO3\CMS\Core\Type\File\ImageInfo\$imageSizes, and TYPO3\CMS\Core\Type\File\ImageInfo\getImageSizes().

Member Data Documentation

◆ $imageSizes

array false null TYPO3\CMS\Core\Type\File\ImageInfo::$imageSizes
protected