Skip to content

Quality and size dials ​

Per-format meaning of quality, effort and compress. Syntax and applicability are in docs/reference/intents.md and docs/reference/operations.md.

1. Rule ​

There is no uniform quality dial. quality is expressed in the target format's own scale, with the target format's own range, and a format without a fidelity axis makes quality inapplicable, which is E_INAPPLICABLE, never a silent no-op.

Anchors:

  • quality always increases monotonic fidelity and cost with its value
  • Where the reference encoder counts backwards (CRF, LAME -V), the mapping inverts it, so quality100 is always best quality
  • effort is the speed dial where a format has one, likewise normalised so higher is slower and better
  • compress is a lossless compression level, 0 to 9, and never changes pixels

Defaults policy: the reference encoder's documented default when one is documented; otherwise a recorded choice, marked as such.

2. Images ​

Formatquality rangeDefaulteffort rangeDefaultcompresscolors
jpg1 to 10075nonenonenone
pnginapplicablenone0 to 92 to 256
webp1 to 100750 to 64nonenone
avif1 to 100600 to 106nonenone
heic1 to 10050nonenonenone
gifinapplicablenonenone2 to 256, default 256
tiffinapplicablenone0 to 9, default 6none
bmpinapplicablenonenonenone
icoinapplicablenonenonenone

Capability is per backend and per tool build, not only per format. The table states what a format accepts; whether a particular build can produce it is resolved by the plan compiler against docs/advanced/converters.md, so a format row must never be read as a promise that every backend implements it.

Per-format rules:

  • jpg: quality scales the quantization tables. At quality >= 90 chroma subsampling is 4:4:4, below it 4:2:0. Sampling is set explicitly, never left to the encoder default. Progressive encoding and Huffman optimisation are on by default
  • png: always lossless. compress is the deflate level. Filter selection is adaptive. No quality axis exists, and a request for one is an error
  • webp: lossy by default. lossless switches to lossless mode, where quality instead trades speed for size and effort sets the method. Both modes go through libwebp, which is what ImageMagick and FFmpeg link
  • avif: quality is the colour quantiser, 100 being lossless; alpha uses the same value. effort is the encoder speed
  • heic: quality is the encoder quality; lossless overrides it, and combining the two is E_EXCLUSIVE
  • gif: paletted, at most 256 entries. colors sets the palette size; dithering is Floyd-Steinberg
  • tiff: compress selects the deflate level; other codecs are chosen by codec when that lands
  • bmp, ico: no encoder dials; only geometry and colour operations apply

3. Audio and video ​

Reserved. Ranges and defaults are fixed with the audio and video verticals. Verified so far:

FormatDialRangeSource
flaccompress0 to 8, default 5xiph flac(1) documentation
mp3qualitymaps to LAME -V, 0 to 9FFmpeg codecs documentation
av1qualitymaps to CRF 0 to 63FFmpeg codecs documentation
hevcqualitymaps to CRF 0 to 51FFmpeg codecs documentation, NVENC cq
h264qualitymaps to CRF 0 to 51FFmpeg codecs documentation, NVENC cq
opusbitrate6 to 512 kbit/sFFmpeg codecs documentation

Not yet verified against ffmpeg -h encoder=<encoder>: libx264 and libx265 CRF bounds, MJPEG -q:v bounds, libvorbis -q:a bounds, AAC VBR behaviour.

4. Sources ​

5. Re-verification ​

Every row must be reproducible without trust in this document:

magick -list format
ffmpeg -h encoder=<encoder>
avifenc --help
heif-enc --help
cwebp -longhelp

A range that cannot be reproduced from a local probe or a cited document does not ship.