Created
February 11, 2015 15:26
-
-
Save Mika-/185c8d777aab3ebba548 to your computer and use it in GitHub Desktop.
Resize and convert image to web optimized jpg with imagemagick and mozjpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert source.png -resize 1920x1080 -background white -flatten TGA:- | cjpeg -quality 90 -targa -outfile compressed.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tried
convert source.png -sampling-factor 4:2:0 -strip -colorspace RGB TGA:- | cjpeg -quality 85 -targa -outfile ugly5.jpg
pagespeed still won't like it as libpng will throw some artifacts and get it down from 20.7kB to 18.1kb, over 10%, which is pagespeed's warning threshold.