mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
linter
This commit is contained in:
parent
bbb059b739
commit
1ccc1ac11a
@ -31,7 +31,7 @@ export default function AdjustContrastPreview({ file, parameters }: Props) {
|
||||
}, [file, requestThumbnail]);
|
||||
|
||||
useEffect(() => {
|
||||
let revoked: string | null = null;
|
||||
const revoked: string | null = null;
|
||||
const render = async () => {
|
||||
if (!thumb || !canvasRef.current) return;
|
||||
const img = new Image();
|
||||
|
||||
@ -38,7 +38,8 @@ export function applyAdjustmentsToCanvas(src: HTMLCanvasElement, params: AdjustC
|
||||
// Saturation via HSL
|
||||
const rn = r / 255, gn = g / 255, bn = b / 255;
|
||||
const max = Math.max(rn, gn, bn); const min = Math.min(rn, gn, bn);
|
||||
let h = 0, s = 0, l = (max + min) / 2;
|
||||
let h = 0, s = 0;
|
||||
const l = (max + min) / 2;
|
||||
if (max !== min) {
|
||||
const d = max - min;
|
||||
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user