function GDToolkit::setType
Sets the PHP type of the image.
Parameters
int $type: The image type represented by a PHP IMAGETYPE_* constant (e.g. IMAGETYPE_JPEG).
Return value
$this
1 call to GDToolkit::setType()
- GDToolkit::parseFile in core/
modules/ system/ src/ Plugin/ ImageToolkit/ GDToolkit.php - Determines if a file contains a valid image.
File
-
core/
modules/ system/ src/ Plugin/ ImageToolkit/ GDToolkit.php, line 407
Class
- GDToolkit
- Defines the GD2 toolkit for image manipulation within Drupal.
Namespace
Drupal\system\Plugin\ImageToolkitCode
public function setType($type) {
if (in_array($type, static::supportedTypes())) {
$this->type = $type;
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.