For my test file I get a thumbnail file size of 4.6kB when first resizing to 500px. When resizing straight to thumbnail I get a file size of 15.5kB, quite a big difference.
I then tried the latest version of ImageMagick, 6.8.6-9. This doesn't have a big difference between the way the thumbnail is created - from a 500px file is 8.3kB vs. 8.5kB straight from the larger file. But this is worse performance than 6.5.9 when resizing to 500px before creating the thumbnail.
Code: Select all
~/apps/ImageMagick/bin/convert \
-filter Lanczos \
medium.jpg \
-set option:filter:filter Lanczos \
-set option:filter:blur 0.8 \
-resize 500x500 \
-quality 80 \
small.jpg
~/apps/ImageMagick/bin/convert \
medium.jpg \
-strip \
-thumbnail 150x150 \
thumb-from-medium.jpg
#6.8.6-9=8.5kB 6.5.9=15.5kB
~/apps/ImageMagick/bin/convert \
small.jpg \
-strip \
-thumbnail 150x150 \
thumb-from-small.jpg
#6.8.6-9=8.3kB 6.5.9=4.6kB
When I compiled 6.8.6-9 it didn't originally build with jpeg and tiff support, so I had to point it to jpeg and tiff libs, and I used libjpeg-turbo for the jpeg lib, which I guess might be what is causing the difference?
Does anyone know
1) Why I get such a big difference in the thumbnail file size with 6.5.9 depending on whether the image has been resized down to 500px or not?
2) Why the thumbnail file size is larger with 6.8.6-9 and how I can reduce it?
Thanks
Dave