Skip to content

Commit

Permalink
handle IM6 with FilterTypes enum name
Browse files Browse the repository at this point in the history
  • Loading branch information
whatdoineed2do/Ray committed Jan 26, 2024
1 parent 947e432 commit c3339bc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ PKG_PROG_PKG_CONFIG

AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])

PKG_CHECK_MODULES(IMAGEMAGICK, [Magick++ >= 7.1.0])
PKG_CHECK_MODULES(IMAGEMAGICK, [Magick++ >= 6.9.11])
PKG_CHECK_EXISTS([Magick++ < 7.0.0],
[AC_DEFINE([HAVE_IM_RESIZE_FILTERTYPES], 1,
[Defined if IM resize filter enum type change])])


AC_ARG_ENABLE(exiv2,
AS_HELP_STRING([--disable-exiv2],[do not generate Exif]),
Expand Down
4 changes: 4 additions & 0 deletions src/Gopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ struct _Gopts {

struct {
void (Magick::Image::*fptr)(const Magick::Geometry&);
#ifdef HAVE_IM_RESIZE_FILTERTYPES
Magick::FilterTypes filter;
#else
Magick::FilterType filter;
#endif
float ratio;
} scale;

Expand Down
4 changes: 4 additions & 0 deletions src/diptych.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ int main(int argc, char* const argv[])
thegopts.scale.fptr = &Magick::Image::resize;
struct IMfltrs {
const char* name;
#ifdef HAVE_IM_RESIZE_FILTERTYPES
Magick::FilterTypes fltr;
#else
Magick::FilterType fltr;
#endif
} imfltrs[] =
{
"Point", Magick::PointFilter,
Expand Down

0 comments on commit c3339bc

Please sign in to comment.