Convert to RGB colorspace will not be multithreaded

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
normandwilliams
Posts: 2
Joined: 2014-08-01T12:03:44-07:00
Authentication code: 6789

Convert to RGB colorspace will not be multithreaded

Post 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
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Convert to RGB colorspace will not be multithreaded

Post 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?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
normandwilliams
Posts: 2
Joined: 2014-08-01T12:03:44-07:00
Authentication code: 6789

Re: Convert to RGB colorspace will not be multithreaded

Post 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.
Post Reply