rflynn / imgmin

Lossy image optimization
MIT License
650 stars 32 forks source link

Progressive JPEG #41

Closed szepeviktor closed 9 years ago

szepeviktor commented 10 years ago

Is it possible to convert to progressive JPEGs?

I think convert -interlace JPEG after-imgmin.jpg output.jpg will degrade quality.

szepeviktor commented 10 years ago

WebPagetest now warns you for any JPEGs that are not progressive.

szepeviktor commented 10 years ago

For example jpegtran does it jpegtran -perfect -optimize -progressive -outfile output.jpg after-imgmin.jpg

rflynn commented 9 years ago

I tried this out and got worse results. Update to the latest imgmin again and see what you get.

[rf@Ryans-MacBook-Pro ~/src/imgmin/examples]$ ls -l Afghan-Girl-by-Steve-McCurry* | awk '{print $5,$9}'
30286 Afghan-Girl-by-Steve-McCurry-after.jpg
60198 Afghan-Girl-by-Steve-McCurry.jpg
[rf@Ryans-MacBook-Pro ~/src/imgmin/examples]$ jpegtran -perfect -optimize -progressive -outfile Afghan-Girl-by-Steve-McCurry-after-jpegtran.jpg Afghan-Girl-by-Steve-McCurry-after.jpg
[rf@Ryans-MacBook-Pro ~/src/imgmin/examples]$ ls -l Afghan-Girl-by-Steve-McCurry* | awk '{print $5,$9}'
31067 Afghan-Girl-by-Steve-McCurry-after-jpegtran.jpg
30286 Afghan-Girl-by-Steve-McCurry-after.jpg
60198 Afghan-Girl-by-Steve-McCurry.jpg
szepeviktor commented 9 years ago

Thank you. I will report v1.1 experiences. Progressive JPEGs are also important for visitors, they load nicely.

szepeviktor commented 9 years ago

Honestly I switched to https://github.com/danielgtaylor/jpeg-archive because you can select image comparision method an you have mozjpeg and the output is always progressive. Please consider examining it.