diff --git a/ChangeLog b/ChangeLog index 45804498..778b0b98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ - support TIFF with premultiplied alpha in any band 17/9/19 started 8.8.4 +- improve compatibility with older imagemagick versions 31/8/19 started 8.8.3 - revert sharpen restoring the input colourspace diff --git a/configure.ac b/configure.ac index 510f9e62..a48c1ee7 100644 --- a/configure.ac +++ b/configure.ac @@ -721,6 +721,16 @@ if test x"$magick6" = x"yes"; then ] ) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [#include ], + [ColorspaceType colorspace = HCLpColorspace] + )], + [AC_DEFINE(HAVE_HCLPCOLORSPACE,1, + [define if your Magick has HCLpColorspace.]) + ] + ) + # GetImageMagick() takes two args under GM, three under IM AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( diff --git a/libvips/foreign/magick.c b/libvips/foreign/magick.c index 9c4ab5d5..806233c9 100644 --- a/libvips/foreign/magick.c +++ b/libvips/foreign/magick.c @@ -577,21 +577,24 @@ static MagickColorspaceTypeNames magick_colorspace_names[] = { #ifdef HAVE_CMYCOLORSPACE { CMYColorspace, "CMYColorspace" }, { HCLColorspace, "HCLColorspace" }, - { HCLpColorspace, "HCLpColorspace" }, { HSBColorspace, "HSBColorspace" }, + { LabColorspace, "LabColorspace" }, + { LogColorspace, "LogColorspace" }, + { LuvColorspace, "LuvColorspace" }, +#endif /*HAVE_CMYCOLORSPACE*/ + +#ifdef HAVE_HCLPCOLORSPACE + { HCLpColorspace, "HCLpColorspace" }, { HSIColorspace, "HSIColorspace" }, { HSVColorspace, "HSVColorspace" }, - { LabColorspace, "LabColorspace" }, { LCHColorspace, "LCHColorspace" }, { LCHabColorspace, "LCHabColorspace" }, { LCHuvColorspace, "LCHuvColorspace" }, - { LogColorspace, "LogColorspace" }, { LMSColorspace, "LMSColorspace" }, - { LuvColorspace, "LuvColorspace" }, { scRGBColorspace, "scRGBColorspace" }, { xyYColorspace, "xyYColorspace" }, { YDbDrColorspace, "YDbDrColorspace" }, -#endif /*HAVE_CMYCOLORSPACE*/ +#endif /*HAVE_HCLPCOLORSPACE*/ /* im7 has this, I think *