This is my code:
Code: Select all
...
#include <Magick++.h>
#include <MagickCore/MagickCore.h>
#include <MagickWand/MagickWand.h>
#include <MagickCore\accelerate-private.h>
...
using namespace Magick;
int main(int argc, char *argv[])
{
EnableOpenCL();
InitializeMagick(NULL);
EnableOpenCL(); // Executed this after InitializeMagick too to be sure. Maybe it's needed to be executed after InitializeMagick().
Image img;
img.read("F:/tmp/test/22/7.png");
// These two functions should use GPU. But they don't. :
img.gaussianBlur(15, 3);
img.edge();
}
What part of it is wrong?
This is the output of convert -version:
Code: Select all
C:\Users\User1>convert -version
Version: ImageMagick 7.0.8-4 Q16 x64 2018-06-29 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 190024210
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib