phalcon/cphalcon · error · Phalcon\Image\Exception
Imagick::getImageAlphaChannel failed
Error message
Imagick::getImageAlphaChannel failed
What it means
Imagick adapter watermarking: ImagickNative::getImageAlphaChannel() failed while preparing the background canvas — the ImageMagick call errored, e.g. an invalid/empty image object or a delegate failure.
Solutions
- Verify the source and background images are valid before watermarking
- Catch ImagickException around the alpha check and inspect the underlying ImageMagick error
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at phalcon/Image/Adapter/Imagick.zep:273 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/6860950f077b1196.
Report an issue: GitHub.
Appendix: source
Thrown at phalcon/Image/Adapter/Imagick.zep:273
let pixel2 = new ImagickPixel("transparent");
let background = new ImagickNative();
/** @var ImagickNative $image */
let image = this->image;
image->setIteratorIndex(0);
while (true) {
background->newImage(this->width, this->height, pixel1);
try {
if (true !== background->getImageAlphaChannel()) {
background->setImageAlphaChannel(
constant("Imagick::ALPHACHANNEL_SET")
);
}
} catch ImagickException {
throw new Exception("Imagick::getImageAlphaChannel failed");
}
background->setImageBackgroundColor(pixel2);
background->evaluateImage(
constant("Imagick::EVALUATE_MULTIPLY"),
localOpacity,
constant("Imagick::CHANNEL_ALPHA")
);
background->setColorspace(
image->getColorspace()
);
let result = background->compositeImage(
image,
constant("Imagick::COMPOSITE_DISSOLVE"),
0,View on GitHub (pinned to b7419de9cd)