Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Imagick::getImageImagick::getImageArtifact>
^ImagickLast updated: Mon, 26 Oct 2026

Imagick::getImageAlphaChannel

(PECL imagick 2 >= 2.3.0, PECL imagick 3)

Imagick::getImageAlphaChannel — Checks if the image has an alpha channel

Description

public function Imagick::getImageAlphaChannel(): bool

Returns whether the image has an alpha channel.

Parameters

This function has no parameters.

Return Values

Returns true if the image has an alpha channel value and false if not, i.e. the image is RGB rather than RGBA or CMYK rather than CMYKA.

Errors/Exceptions

Throws ImagickException on error.

Changelog

Version Description
PECL imagick 3.6.0 Returns a bool now; previously, an int was returned.

<Imagick::getImageImagick::getImageArtifact>
^ImagickLast updated: Mon, 26 Oct 2026