diff --git a/ChangeLog b/ChangeLog index da204bdc..323e162d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ Unreleased * You can now pass null to ImagickDraw::setStrokeDashArray() to reset the dash array. - Added: * function Imagick::clutImageWithInterpolate(Imagick $lookup_table, int $pixel_interpolate_method): bool {} - * Constants Imagick::COMPRESSION_BC5, Imagick::COMPRESSION_BC7, Imagick::COMPRESSION_LERC, Imagick::DIRECTION_TOP_TO_BOTTOM + * Constants Imagick::COMPRESSION_BC5, Imagick::COMPRESSION_BC7, Imagick::COMPRESSION_LERC, Imagick::DIRECTION_TOP_TO_BOTTOM, Imagick::ALPHACHANNEL_OFF_IF_OPAQUE 3.7.0 - Added: diff --git a/imagick_helpers.c b/imagick_helpers.c index 6d446617..02f1581c 100644 --- a/imagick_helpers.c +++ b/imagick_helpers.c @@ -1823,6 +1823,13 @@ void php_imagick_initialize_constants(TSRMLS_D) IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_ASSOCIATE", AssociateAlphaChannel); IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_DISSOCIATE", DisassociateAlphaChannel); #endif + +#if MagickLibVersion >= 0x712 + // Technically >= 7.1.1-26 but we still don't have a mechanism for + // detecting patch versions. + IMAGICK_REGISTER_CONST_LONG("ALPHACHANNEL_OFF_IF_OPAQUE", OffIfOpaqueAlphaChannel); +#endif + /* DiscreteAlphaChannel, CopyAlphaChannel, DisassociateAlphaChannel, DeactivateAlphaChannel,