You are here

private static function FMDiskFileSystem::getImageInfo in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2

3 calls to FMDiskFileSystem::getImageInfo()
FMDiskFileSystem::getFiles in src/Flmngr/FlmngrServer/fs/FMDiskFileSystem.php
Gets a files list.
FMDiskFileSystem::getImagePreview in src/Flmngr/FlmngrServer/fs/FMDiskFileSystem.php
Gets image preview.
FMDiskFileSystem::resizeFile in src/Flmngr/FlmngrServer/fs/FMDiskFileSystem.php
Creates a resized image.

File

src/Flmngr/FlmngrServer/fs/FMDiskFileSystem.php, line 217

Class

FMDiskFileSystem
Implements file system interface. Provides an interface to access file system (local disc FS). This is the correct module to replace if you want to implement some custom file system support (i. e. network file system like Amazon S3).

Namespace

Drupal\n1ed\Flmngr\FlmngrServer\fs

Code

private static function getImageInfo($file) {
  $size = getimagesize($file);
  if ($size === FALSE) {
    throw new MessageException(Message::createMessage(Message::IMAGE_PROCESS_ERROR));
  }
  $imageInfo = new ImageInfo();
  $imageInfo->width = $size[0];
  $imageInfo->height = $size[1];
  return $imageInfo;
}