pub const TJPARAM_TJPARAM_RESTARTBLOCKS: TJPARAM = 18;
Expand description

JPEG restart marker interval in MCU blocks (lossy) or samples (lossless) [compression only]

The nature of entropy coding is such that a corrupt JPEG image cannot be decompressed beyond the point of corruption unless it contains restart markers. A restart marker stops and restarts the entropy coding algorithm so that, if a JPEG image is corrupted, decompression can resume at the next marker. Thus, adding more restart markers improves the fault tolerance of the JPEG image, but adding too many restart markers can adversely affect the compression ratio and performance.

Value

  • the number of MCU blocks or samples between each restart marker [default: 0 (no restart markers)]

Setting this parameter to a non-zero value sets #TJPARAM_RESTARTROWS to 0.