Page 1 of 1

Convert to RGB colorspace will not be multithreaded

Posted: 2014-08-01T13:33:40-07:00
by normandwilliams
Hello IMagicians,

I encountered an unexplained behaviour that i would like to understand.

I am using IM 6.5.4-7 on centos. If i am converting an image from jpeg to png and specifying the -colorspace Gray i will see that convert is spawning other threads to do the work (given i have MAGICK_THREAD_LIMIT > 1) but if I specify -colorspace RGB the work is always done on the main thread. Why is it? Can you explain this behavior? Thank you for reading. Normand

convert -colorspace Gray -bench 1000 image.jpg image.png # multiple threads

convert -colorspace RGB -bench 1000 image.jpg image.png # only main thread

Re: Convert to RGB colorspace will not be multithreaded

Posted: 2014-08-01T13:58:17-07:00
by dlemstra
Your version is 5 years old so I would first suggest you upgrade. Is it possible that those images are already RGB so nothing needs to be done?

Re: Convert to RGB colorspace will not be multithreaded

Posted: 2014-08-01T15:01:30-07:00
by normandwilliams
dlemstra wrote:Your version is 5 years old so I would first suggest you upgrade. Is it possible that those images are already RGB so nothing needs to be done?
I will see about upgrading a little later. I did some tests after your question. Actually if the source file is of colorspace Gray or RGB the conversion to RGB will not see more than one thread but whether the source file is Gray or RGB the conversion to Gray colorspace will be done with more than one thread. This is what puzzles me.