This commit is contained in:
devdatt 2026-02-19 09:02:08 +05:30
parent 10346ca2ea
commit bfd43977a0
1 changed files with 14 additions and 3 deletions

View File

@ -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