It'd be great if you put two in this post so we can see the difference without having to run all of the commands first.
Using ImageMagick to make sharp web-sized photographs
41–50 of 64 posts
Re: Using ImageMagick to make sharp web-sized photographs
#42Part of the reason rescaled images look dim and blurry is because rescaling software usually assumes gamma 1.0 instead of 2.2: http://www.4p8.com/eric.brasseur/gamma.html There are many more good essays on image rescaling here: http://entropymine.com/imageworsener/
Re: Using ImageMagick to make sharp web-sized photographs
#43Re: Using ImageMagick to make sharp web-sized photographs
#44Has anyone played / tested this with regard to the responsive image hack/trick by the filament group : http://filamentgroup.com/lab/rwd_img_compression/
An example:
http://www.andrewmunsell.com/blog/
Scroll down to the "Now is the Future" blog post. The cover image of the Seattle skyline is 1700x666 and ~65kb (though, it's been recompressed into WebP by mod_pagespeed if your browser supports it). The JPG (before WebP conversion) is ~88kb.
To see it without the recompression and turn mod_pagespeed off, you can look at the image on the page:
Re: Using ImageMagick to make sharp web-sized photographs
#45Of course, you can always make them even sharper with filters if you want.
Re: Using ImageMagick to make sharp web-sized photographs
#46Part of the reason rescaled images look dim and blurry is because rescaling software usually assumes gamma 1.0 instead of 2.2: http://www.4p8.com/eric.brasseur/gamma.html There are many more good essays on image rescaling here: http://entropymine.com/imageworsener/
However, Safari ignores gamma and produces a flat gray rectangle when scaling down the Dalai Lama image, like Firefox does. I seem to remember that Safari used to do proper gamme correction in earlier versions, but they were pressured to abandon it because it was more important to give the result expected by websites.
Re: Using ImageMagick to make sharp web-sized photographs
#47Earlier quoted context omitted.
I agree: that jumped out at me enough that I came here to make the same comment. I can hardly think of a case where I'd want to use a 98 quality setting on a JPEG. Maybe it would be a good choice if I wanted to preserve an almost-pristine copy of an original, but I'd compare the resulting file size to a lossless PNG first. Every quality step from 100 down to 95 gives a huge benefit in file size, and going from 95 to…
This also jumped out at me. My company ( http://www.firebox.com ) is built on having amazing looking images for products. No one could see any difference between the quality of images between 87 and 95, but it saved us roughly 50% in file size. Also for what it's worth, we spent a lot of time a/b testing 87 vs 95 with our users, but there was no conclusive difference
Interestingly, we've done WebP support, and while the files are smaller across the board, visual quality deteriorates really quickly once you start dropping that quality value, even in small increments.
Re: Using ImageMagick to make sharp web-sized photographs
#48 ls *.jpg|while read i;do gm convert $i -resize "900x" -unsharp 2x0.5+0.5+0 -quality 98 `basename $i .jpg`_s.jpg;done
The part I take issue with is the unnecessary invocation of `ls`. The shell does the glob expansion. A `for` loop is better suited for this. Also, if using bash,* we can get rid of basename. for file in *.jpg; do gm convert $file -resize "900x" -unsharp 2x0.5+0.5+0 -quality 98 ${file%.jpg}_s.jpg; done
* zsh fans, I'm sure it works there too.Re: Using ImageMagick to make sharp web-sized photographs
#49My solution: https://github.com/vladstudio/Vladstudio-smart-resize-Bash-s... The biggest problem of scaling down an image is to find right settings for resampling and sharpening. After many expreiments, I found it impossible to achieve good results by simply running convert with a line of arguments. So I came up with this script, which basically does the following: * configures -interpolate bicubic -filter Lagrange;…
This is fine if you have a limited set of images that you handpick and optimize. Do you have any suggestions when there are thousands of images and all this needs to be automated?
It can distribute the work across the available CPU cores, and it can even distribute the work across different machines using SSH: https://www.gnu.org/software/parallel/man.html#example__dist...
Re: Using ImageMagick to make sharp web-sized photographs
#50Is this to be regarded as image quality preservation or a photo manipulation that increases sharpness "artificially"?