Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GDToolkit.php

function GDToolkit::getWidth

Overrides ImageToolkitInterface::getWidth

File

core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php, line 351

Class

GDToolkit
Defines the GD2 toolkit for image manipulation within Drupal.

Namespace

Drupal\system\Plugin\ImageToolkit

Code

public function getWidth() {
    if ($this->preLoadInfo) {
        return $this->preLoadInfo[0];
    }
    elseif ($res = $this->getImage()) {
        return imagesx($res);
    }
    else {
        return NULL;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal