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

Imagick::getImageType

PHP function Edit on GitHub ✎

(PECL imagick 2, PECL imagick 3)

Gets the image type

Description

Imagick::getImageType(): int

Returns the type of the image, derived from its colorspace, its storage class and whether it carries an alpha channel. The pixels themselves are not examined, so the value reflects how the image is currently held rather than the smallest type it could be reduced to.

Parameters Parameters

Return Values

Returns one of the following imagick::IMGTYPE_* constants. imagick::IMGTYPE_UNDEFINED and imagick::IMGTYPE_OPTIMIZE are never returned.

Errors/Exceptions

Throws

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