imagemin / imagemin-jpeg-recompress

jpeg-recompress imagemin plugin

Home Page:https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How are quality presets and min/max settings related?

mdelarioja opened this issue · comments

It's unclear from the documentation how these options are related. If I choose the "high" quality preset, does that have any effect on the min/max compression options? E.g. if the high quality preset is used, does that mean that the min is set at 60 rather than the default (40)?

We would be happy to update the docs if anyone can figure it out. The docs here are just taken from the jpeg-recompress CLI:

❯ ./jpeg-recompress

  Usage: ./jpeg-recompress [options] input.jpg compressed-output.jpg

  Options:

    -V, --version                 output program version
    -h, --help                    output help information
    -t, --target [arg]            Set target quality [0.9999]
    -q, --quality [arg]           Set a quality preset: low, medium, high, veryhigh [medium]
    -n, --min [arg]               Minimum JPEG quality [40]
    -x, --max [arg]               Maximum JPEG quality [95]
    -l, --loops [arg]             Set the number of runs to attempt [6]
    -a, --accurate                Favor accuracy over speed
    -m, --method [arg]            Set comparison method to one of 'mpe', 'ssim', 'ms-ssim', 'smallfry' [ssim]
    -s, --strip                   Strip metadata
    -d, --defish [arg]            Set defish strength [0.0]
    -z, --zoom [arg]              Set defish zoom [1.0]
    -r, --ppm                     Parse input as PPM instead of JPEG
    -c, --no-copy                 Disable copying files that will not be compressed
    -p, --no-progressive          Disable progressive encoding
    -S, --subsample [arg]         Set subsampling method. Valid values: 'default', 'disable'. [default]
    -Q, --quiet                   Only print out errors.

https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress