Skip to content

Commit

Permalink
[image] Fix compilation on Windows (#4484)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
  • Loading branch information
alxbilger and bakpaul committed Feb 14, 2024
1 parent 4aec131 commit 17150e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion applications/plugins/image/ImageFilter.h
Expand Up @@ -221,7 +221,16 @@ class ImageFilter : public core::DataEngine
if(updateImage)
{
float amplitude=0; if(p.size()) amplitude=(float)p[0];
cimglist_for(img,l) img(l)=inimg(l).get_blur_anisotropic (amplitude);
#if defined(_MSC_VER)
if constexpr (std::is_same_v<Ti, long> || std::is_same_v<Ti, unsigned long>) //this situation triggers compilation error on Windows and needs a special treatment
{
cimglist_for(img, l) img(l) = cimg_library::CImg<float>(inimg(l),false).blur_anisotropic (amplitude);
}
else
#endif
{
cimglist_for(img,l) img(l)=inimg(l).get_blur_anisotropic (amplitude);
}
}
break;
case DERICHE:
Expand Down

0 comments on commit 17150e4

Please sign in to comment.