| Server IP : 217.154.3.148 / Your IP : 216.73.216.90 Web Server : Apache System : Linux blissful-wright.217-154-3-148.plesk.page 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : gracious-boyd_hfhh1h8vo9n ( 10000) PHP Version : 8.3.31 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs/lib/masks/ |
Upload File : |
import { illuminationNormalize } from "@/utils/maskOps";
type IlluminationOptions = {
radius?: number;
amount?: number;
};
export function normalizeIllumination(
gray: Uint8Array,
width: number,
height: number,
options: IlluminationOptions = {},
): Uint8Array {
const radius = Math.max(0, Math.round(options.radius ?? 32));
const amount = Math.max(0, Math.min(1, options.amount ?? 0.75));
if (radius === 0 || amount === 0) return Uint8Array.from(gray);
return illuminationNormalize(gray, width, height, radius, amount);
}