+repage -gravity center -extent "174x174" \ Mpr:myoriginal -coalesce -resize "174x174>" \ +repage -gravity center -extent "250x250" \ To sum it all up I ended up using this command: // MPRĬonvert "orig_image.jpg" -quality 80 -coalesce \ Removed the "-colorspace rgb" argument after which the MPR convert version works the best and gave additional boost in performance. Single command convert in a loop finishes in 62 seconds while multiple command conversion executes in just 16 seconds? # convert -versionĬopyright: Copyright (C) 1999-2016 ImageMagick Studio LLCĭelegates (built-in): bzlib freetype jng jpeg lzma png tiff wmf xml zlibĪlso installed libjpeg-turbo jpg processing library but I cannot tell (don't know how to check) if ImageMagic is using it or the old libjpeg.Īny ideas how to speed up image converting process?ĭon't know how to format it properly here on stackoverflow, but I just noticed that single line command had an argument "-colorspace rgb" and multiple line commands did not which actually results in such strange results where multiple commands are processed faster. Single command conversion incorporating ImageMagicks mpr: convert "image.jpg" -quality 85 -colorspace rgb -coalesce \Īfter performance testing the results are somewhat unexpected. Multiple command conversion (each command run via php's exec() in a loop): convert "image.jpg" \ ( ImageMagick batch resizing performance) Also a memory utilization was mentioned as a performance boost. While browsing different topics on imagemagick convert performance I got a feeling that a single command should be way faster than individual converts for each image size. Each image is ~2-3Mb in size.įiles to be generated out of the source: orig_image.jpg // original image I have a few thousand images to be processed so each millisecond counts.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |