MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / mse_to_quality

Function mse_to_quality

src/quant.rs:475–480  ·  view source on GitHub ↗
(mse: f64)

Source from the content-addressed store, hash-verified

473}
474
475pub(crate) fn mse_to_quality(mse: f64) -> u8 {
476 for i in (1..101).rev() {
477 if mse <= quality_to_mse(i) + 0.000001 { return i; }
478 }
479 0
480}

Callers 1

qualityMethod · 0.85

Calls 1

quality_to_mseFunction · 0.85

Tested by

no test coverage detected