public function hasAlpha(): bool
    {
        return $this->bands === 2 ||
            ($this->bands === 4 &&
                $this->interpretation !== Interpretation::CMYK) ||
            $this->bands > 4;
    }
public function hasAlpha(): bool
    {
        return $this->bands === 2 ||
            ($this->bands === 4 &&
                $this->interpretation !== Interpretation::CMYK) ||
            $this->bands > 4;
    }
public function hasAlpha ( ) : bool { return $ this -> bands === 2 || ( $ this -> bands === 4 && $ this -> interpretation !== Interpretation :: CMYK ) || $ this -> bands > 4 ; }
Does this image have an alpha channel?

Uses colour space interpretation with number of channels to guess
this.

@return bool indicating if this image has an alpha channel.
Does this image have an alpha channel?