php8.5
Home/ Manual/ imagick / imagick/ Imagick::getImageAlphaChannel

Imagick::getImageAlphaChannel

PHP function Edit on GitHub ✎

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

Checks if the image has an alpha channel

Description

Imagick::getImageAlphaChannel(): bool

Returns whether the image has an alpha channel.

Parameters 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

Changelog

VersionDescription
PECL imagick 3.6.0Returns a Boolean now; previously, an Integer was returned.

Source: reference/imagick/imagick/getimagealphachannel.xml · from the official PHP manual (php/doc-en)