Problem: ImageMagick very slow

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
afilipi

Problem: ImageMagick very slow

Post by afilipi »

I have installed the 16-bit version of ImageMagick on Win2000 and WinXP OSes. Doing

convert "M:\picture.JPG" -channel green -fx "u*1.03" -quality 100%% "M:\picture_edited.JPG"

takes up almost two minutes (picture.JPG is an 8 megapixel photo). The 8-bit version of IM is similarly slow. Boosting the green channel in Paint Shop takes about two seconds.

Why is IM so slow? Is this normal for a Windows installation? Am I doing something wrong? I have administrator rights.

Thanks,
Ales
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Problem: ImageMagick very slow

Post by el_supremo »

Instead of using -fx try -evaluate:

Code: Select all

convert "M:\picture.JPG" -channel green -evaluate multiply 1.03 -quality 100%% "M:\picture_edited.JPG"
Pete
afilipi

Re: Problem: ImageMagick very slow

Post by afilipi »

Thanks, Pete! That did it. I guess I have to go over each and every IM option this weekend. For a person who has been using PaintShop/PhotoShop for the last decade, the transition is not easy.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem: ImageMagick very slow

Post by anthony »

Remember -fx is an interpereted option that is parsed once for every pixel and every
output channel for that pixel (normally 3).

-evaluate predates -fx by a couple of months and is ment to hard code simple single image math functions into IM. If a -fx function is thought useful it can be added 'built in' in a number of different general ways, depending on what it does and what input it needs.
See (especially the last part of the page)
http://www.imagemagick.org/Usage/transform/#fx
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply