Page 1 of 1

About Multithreading and convert

Posted: 2012-05-02T04:57:25-07:00
by Shakin
Hi All

I run convert.exe with "-limit thread" key and number of threads, that equals number of processor cores on my PC.
The problem is: in my Visual Studio Debugger I connect to the convert.exe process and try to see the threads. There is none. Can not I see them or is it really so?
A larger question is - How can I effectively use threads with convert utility. I have big volume of files to convert and performance is important.

Thank you, in advance

Re: About Multithreading and convert

Posted: 2012-05-02T07:25:41-07:00
by Bonzo
I do not know if this thread is of interest: viewtopic.php?f=1&t=20896

Re: About Multithreading and convert

Posted: 2012-05-03T18:44:49-07:00
by anthony
Your IM may not be compiled with openMP enabled.

Re: About Multithreading and convert

Posted: 2012-05-04T00:10:22-07:00
by Shakin
anthony wrote:Your IM may not be compiled with openMP enabled.
"convert -version" says it is. Here is the output:

Version: ImageMagick 6.7.6-5 2012-04-04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

Re: About Multithreading and convert

Posted: 2012-05-07T21:30:43-07:00
by anthony
Note that multiple treads only actually exist for short period of time what IM is processing an image. Generally one thread per row to the thread limit.

TO see them you may need a very large image while appliing a very slow operation, like a large convolution.
For example -gaussian 1000x1 (blur is a 2-pass linear convultion, gaussian is a full 1 pass 2-dimentional convolution then much much slower).

Re: About Multithreading and convert

Posted: 2012-05-09T23:30:20-07:00
by Shakin
anthony wrote:Note that multiple treads only actually exist for short period of time what IM is processing an image. Generally one thread per row to the thread limit.

TO see them you may need a very large image while appliing a very slow operation, like a large convolution.
For example -gaussian 1000x1 (blur is a 2-pass linear convultion, gaussian is a full 1 pass 2-dimentional convolution then much much slower).

And I suspect that it does not work while converting PDF files into any other format. Is this right? Does not multithreading in Image Magic apply to converting PDF files?

Re: About Multithreading and convert

Posted: 2012-05-09T23:56:39-07:00
by anthony
ImageMagick does not itself convert PDF. It passs that task to Ghostscript.

It may read a PDF file from a pipeline, saving into a temporary before passing to Ghostscript, but other than that, it leaves it up to ghostscript to do the conversion to a raster image.


See IM Examples, Text Handling, PS/PDF
http://www.imagemagick.org/Usage/text/#postscript
Ghostscript
http://www.imagemagick.org/Usage/text/#ghostscript

Also see... A word about Vector Image formats.
http://www.imagemagick.org/Usage/formats/#vector

Re: About Multithreading and convert

Posted: 2012-05-10T04:22:06-07:00
by Shakin
Thank you. It's been useful.