update
This commit is contained in:
parent
10346ca2ea
commit
bfd43977a0
|
|
@ -397,15 +397,26 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||||
contrastVal.textContent = c;
|
contrastVal.textContent = c;
|
||||||
saturationVal.textContent = s;
|
saturationVal.textContent = s;
|
||||||
hueVal.textContent = h;
|
hueVal.textContent = h;
|
||||||
|
|
||||||
ffmpegOutput.textContent =
|
|
||||||
`-vf "vpp_qsv=format=nv12:brightness=${b}:contrast=${c}:saturation=${s}:hue=${h}"`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
controls.forEach(id => {
|
controls.forEach(id => {
|
||||||
document.getElementById(id).addEventListener("input", update);
|
document.getElementById(id).addEventListener("input", update);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.getElementById("colorReset").onclick = () => {
|
||||||
|
const defaults = {
|
||||||
|
brightness: 0,
|
||||||
|
contrast: 1,
|
||||||
|
saturation: 1,
|
||||||
|
hue: 0
|
||||||
|
};
|
||||||
|
for (const id in defaults) {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
el.value = defaults[id];
|
||||||
|
document.getElementById(id + "Val").textContent = defaults[id];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
update();
|
update();
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue