Pimcore\Image\Adapter\GD::load PHP Метод

load() публичный Метод

public load ( $imagePath, array $options = [] )
$imagePath
$options array
    public function load($imagePath, $options = [])
    {
        $this->path = $imagePath;
        if (!($this->resource = @imagecreatefromstring(file_get_contents($this->path)))) {
            return false;
        }
        // set dimensions
        list($width, $height) = getimagesize($this->path);
        $this->setWidth($width);
        $this->setHeight($height);
        if (in_array(\Pimcore\File::getFileExtension($imagePath), ["png", "gif"])) {
            // in GD only gif and PNG can have an alphachannel
            $this->setIsAlphaPossible(true);
        }
        $this->setModified(false);
        return $this;
    }