Skip to content

Commit

Permalink
Add missing constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danack committed Feb 9, 2024
1 parent 055ffb2 commit 4d253fe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Expand Up @@ -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
* Constants Imagick::COMPRESSION_BC5, Imagick::COMPRESSION_BC7, Imagick::COMPRESSION_LERC, Imagick::DIRECTION_TOP_TO_BOTTOM

3.7.0
- Added:
Expand Down
15 changes: 14 additions & 1 deletion imagick_helpers.c
Expand Up @@ -1289,6 +1289,11 @@ void php_imagick_initialize_constants(TSRMLS_D)
#if MagickLibVersion >= 0x70C
IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DWAA", DWAACompression);
IMAGICK_REGISTER_CONST_LONG("COMPRESSION_DWAB", DWABCompression);


#if MagickLibVersion >= 0x712
// actually 7.1.1-16, but still can't test patch versions
IMAGICK_REGISTER_CONST_LONG("COMPRESSION_LERC", LERCCompression);
#endif

IMAGICK_REGISTER_CONST_LONG("PAINT_POINT", PointMethod);
Expand Down Expand Up @@ -1554,7 +1559,9 @@ void php_imagick_initialize_constants(TSRMLS_D)
#endif


#if MagickLibVersion >= 0x720
#if MagickLibVersion >= 0x712
// Technically >= 7.1.1-9 but we still don't have a mechanism for
// detecting patch versions.
IMAGICK_REGISTER_CONST_LONG("COLORSPACE_OKLAB", OklabColorspace);
IMAGICK_REGISTER_CONST_LONG("COLORSPACE_OKLCH", OklchColorspace);
#endif
Expand Down Expand Up @@ -1956,6 +1963,12 @@ IMAGICK_REGISTER_CONST_LONG("KERNEL_BINOMIAL", BinomialKernel);
IMAGICK_REGISTER_CONST_LONG("DIRECTION_LEFT_TO_RIGHT", LeftToRightDirection);
IMAGICK_REGISTER_CONST_LONG("DIRECTION_RIGHT_TO_LEFT", RightToLeftDirection);

#if MagickLibVersion >= 0x712
// Technically >= 7.1.1-14 but we still don't have a mechanism for
// detecting patch versions.
IMAGICK_REGISTER_CONST_LONG("DIRECTION_TOP_TO_BOTTOM", TopToBottomDirection);
#endif

// The kernel is scaled directly using given scaling factor without change.
IMAGICK_REGISTER_CONST_LONG("NORMALIZE_KERNEL_NONE", 0);
// Kernel normalization ('normalize_flags' given) is designed to ensure
Expand Down
4 changes: 3 additions & 1 deletion util/check_for_missing_enums.php
Expand Up @@ -158,6 +158,9 @@
'MagickCore/cache-view.h' => [
'VirtualPixelMethod',
],
'MagickCore/channel.h' => [
'AlphaChannelOption',
],
'MagickCore/compare.h' => [
'MetricType',
],
Expand Down Expand Up @@ -194,7 +197,6 @@
'GravityType',
],
'MagickCore/image.h' => [
'AlphaChannelOption',
'ImageType',
'InterlaceType',
'OrientationType',
Expand Down

0 comments on commit 4d253fe

Please sign in to comment.