Page 1 of 1

OpenCL for MagickTransformImageColorspace and MagickScaleImage?

Posted: 2015-04-11T07:29:05-07:00
by mercatore
Good afternoon,
I am using MagickWand in a C program, namely

Code: Select all

MagickTransformImageColorspace(wand, GRAYColorspace);
MagickScaleImage(wand,DHASH_WIDTH,DHASH_HEIGHT);
Have two challenges I'd really appreciate help:
- Are diese two capable of using OpenCL? I cannot find a definite answer (I understand the resize command from the command line interface would use OpenCL).
- How do I check if OpenCL is actually in the library of my Mac / used? I have looked at http://www.imagemagick.org/script/opencl.php and tried to call

Code: Select all

cl_device_id selectedDevice;  // OpenCL device used by ImageMagick
InitImageMagickOpenCL(MAGICK_OPENCL_DEVICE_SELECT_AUTO, NULL, (void*)&selectedDevice, exception);
as advertised but cl_device_id is said to be undefined. Which .h files would I have to include and what library to link when using gcc?

Thanks for your help,
Mercator

Re: OpenCL for MagickTransformImageColorspace and MagickScaleImage?

Posted: 2015-04-11T10:44:59-07:00
by fmw42
If

convert -version

lists OpenCL, then your Mac is capable of using it. Though I am not an expert on that.

The list of OpenCL enabled functions is at http://www.imagemagick.org/script/opencl.php