I've been using IM since 2013 to generate thumbs for images that users posts on my website. Few weeks ago I changed a convert command to mogrify, based on the information on this article: https://www.smashingmagazine.com/2015/0 ... agemagick/
I can say that the result is great, but today I faced a very weird situation. It usualy takes a few seconds to generate every thumb, but I received an image today, that took about 5 minutes to convert.
I appreciate if anyone has any idea.
The image is a jpg, with filesize 346,1 kB, 929x1064 pixels, 96x96ppi, and it's available here: http://bit.ly/2bKNUIn
After some research I discovered the -monitor option, so the command I used is this:
Code: Select all
mogrify -path ./tmp -filter Triangle -define filter:support=2 -thumbnail 448 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -monitor IMG-20160902-WA0002.jpg
Code: Select all
load image[IMG-20160902-WA0002.jpg]: 1063 of 1064, 100% complete
Resize/Image/./tmp[IMG-20160902-WA0002.jpg]: 960 of 961, 100% complete
Blur/Image/./tmp[IMG-20160902-WA0002.jpg]: 960 of 961, 100% complete
Sharpen/Image/./tmp[IMG-20160902-WA0002.jpg]: 512 of 513, 100% complete
Posterize/Image/./tmp[IMG-20160902-WA0002.jpg]: 512 of 513, 100% complete
Classify/Image/./tmp[IMG-20160902-WA0002.jpg]: 512 of 513, 100% complete
Reduce/Image/./tmp[IMG-20160902-WA0002.jpg]: 6956 of 6957, 100% complete
Assign/Image/./tmp[IMG-20160902-WA0002.jpg]: 512 of 513, 100% complete
Save/Image/./tmp[IMG-20160902-WA0002.jpg]: 512 of 513, 100% complete
One thing I could see is, if I change the geometry argument of -thumbnail to anything below 417, for example 400, the execution takes about 3 seconds, and I could see that Reduce is not executed:
Code: Select all
load image[IMG-20160902-WA0002.jpg]: 1063 of 1064, 100% complete
Resize/Image/./tmp[IMG-20160902-WA0002.jpg]: 857 of 858, 100% complete
Blur/Image/./tmp[IMG-20160902-WA0002.jpg]: 857 of 858, 100% complete
Sharpen/Image/./tmp[IMG-20160902-WA0002.jpg]: 457 of 458, 100% complete
Posterize/Image/./tmp[IMG-20160902-WA0002.jpg]: 457 of 458, 100% complete
Classify/Image/./tmp[IMG-20160902-WA0002.jpg]: 457 of 458, 100% complete
Assign/Image/./tmp[IMG-20160902-WA0002.jpg]: 457 of 458, 100% complete
Save/Image/./tmp[IMG-20160902-WA0002.jpg]: 457 of 458, 100% completee
I know that is taking to long on that Reduce step, but I don't know what is the relationship between this step and the -thumbnail argument.
Regards,
Hugo Lavalle