ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMediaImageUtil Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilMediaImageUtil:

Static Public Member Functions

static getImageSize (string $a_location)
 Get image size from location. More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Image utility class

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilMediaImageUtil.php.

Member Function Documentation

◆ getImageSize()

static ilMediaImageUtil::getImageSize ( string  $a_location)
static

Get image size from location.

Exceptions
ilCurlConnectionException

Definition at line 30 of file class.ilMediaImageUtil.php.

30 : ?array
31 {
32 try {
33 $size = getimagesizefromstring(file_get_contents($a_location));
34 } catch (Exception $e) {
35 $size = false;
36 }
37
38 if (!isset($size) || $size === false) {
39 $size = [0,0];
40 }
41 return $size;
42 }

References Vendor\Package\$e.

Referenced by ilObjMediaObject\_determineWidthHeight(), ilObjMediaObjectGUI\getFullscreenSizeObject(), ilMediaItem\getOriginalSize(), and ilObjMediaObjectGUI\getStandardSizeObject().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: