mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 18:19:47 +00:00
Switching to 1.4x rather than 140%
This commit is contained in:
@@ -185,11 +185,11 @@ async function main() {
|
||||
} else {
|
||||
const color = change.afterSize > change.beforeSize ? r : g;
|
||||
const sizeDiff = prettyBytes(change.afterSize - change.beforeSize, { signed: true });
|
||||
const percent = Math.round((change.afterSize / change.beforeSize) * 10000) / 100;
|
||||
const relativeDiff = Math.round((change.afterSize / change.beforeSize) * 1000) / 1000;
|
||||
|
||||
size = `${prettyBytes(change.beforeSize)} -> ${prettyBytes(change.afterSize)}` +
|
||||
' (' +
|
||||
color(`${sizeDiff}, ${percent}%`) +
|
||||
color(`${sizeDiff}, ${relativeDiff}x`) +
|
||||
')';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user