Page 1 of 1
Parallel work - C#
Posted: 2018-11-13T07:54:13-07:00
by eitanmiz
Hello,
1.
How can I parallel work of MagickImage.Convolve(...) so it will work on several threads.
Can I control what behind the thread (i.e for first thread - i want to know which area is responsible by the thread, and even send this information to other processes).
2.
I need to load the image and quick translate it to rgb pixels (even the image file has only "R" and "G" value).
3.
As 2 - but create the image from the bitmap array.
Thanks.
Re: Parallel work - C#
Posted: 2018-11-13T08:08:23-07:00
by snibgo
IM will convolve images with OpenCL if you have that. Otherwise, it will multithread with OpenMP if you have that.
"magick -version" will say, under "Features:", whether you have OpenCL and OpenMP.
Sorry, I don't use Magick.NET or C#, and can't answer those questions.
Re: Parallel work - C#
Posted: 2018-11-14T01:35:22-07:00
by eitanmiz
Magick.NET-Q8-x64 ver 7.8.0.
I think it is OpenJP2.
I don't know how can I declare parallelism
(Maybe:
MagickImage mi = new MagickImage (...)
mi.Settings.<something> ? solve that issue)
i.e how many threads, and not doing this by myself (let imagemagick handle that).
For Convolve function - I need to control how many threads are running.
Re: Parallel work - C#
Posted: 2018-11-14T05:49:48-07:00
by snibgo
OpenJP2 has no relevance to multi-threading.
If your implementation of IM has OpenMP, it will use multithreading. The command "magick -version" will tell you.
If you have multithreading, you can limit how many threads IM uses, eg "-limit thread 3" at the command line. But you can't force it to use a particular number of threads.
Re: Parallel work - C#
Posted: 2018-11-14T06:47:21-07:00
by eitanmiz
I don't understand.
I am new to magickImage.
In visual studio 2017, where can I write magick -version?
In package manager console I wrote:
magick -version
and got the exception:
magick : The term 'magick' is not recognized as the name of a cmdlet, function, ...
As I said, Magick.NET-Q8-x64 ver 7.8.0 (from nuget).
Thanks.
Re: Parallel work - C#
Posted: 2018-11-14T07:38:01-07:00
by snibgo
In a command window, at the command line, type the command "magick -version".
Re: Parallel work - C#
Posted: 2018-11-14T08:15:25-07:00
by eitanmiz
Same exception:
'magick' is not recognized as an internal or external command
I didn't do any magick installation outside visual studio - just installed it by visual studio 2017 -> manage nuget package.
This is forum for magick.net, so I persume that it's OK to post here. I am not using c++ directly.
Re: Parallel work - C#
Posted: 2018-11-14T11:15:41-07:00
by snibgo
Okay, so you haven't installed ImageMagick binaries. Sorry, I can't help further.