/** * @copyright * Copyright 2026 Steven Roussey * All Rights Reserved */ import { CreateWorkflow, type TaskConfig } from "@workglow/task-graph"; import { ImageFilterTask, type ImageFilterInput, type ImageFilterOutput } from "../ImageFilterTask"; import type { ThresholdParams } from "./threshold.cpu"; export interface ImageThresholdTaskInput extends ImageFilterInput { value?: number; } export type ImageThresholdTaskOutput = ImageFilterOutput & Record; export declare class ImageThresholdTask extends ImageFilterTask, ImageThresholdTaskOutput> { static readonly type = "ImageThresholdTask"; static readonly category = "Image"; static title: string; static description: string; static inputSchema(): { readonly type: "object"; readonly properties: { readonly image: { readonly oneOf: readonly [{ readonly type: "string"; readonly format: "image:data-uri"; }, { readonly type: "object"; readonly format: "image"; }]; readonly title: "Image"; readonly description: "Image"; readonly format: "image"; }; readonly value: { readonly type: "number"; readonly title: "Value"; readonly description: "Threshold value (0-255)"; readonly minimum: 0; readonly maximum: 255; readonly default: 128; }; }; readonly required: readonly ["image"]; readonly additionalProperties: false; }; static outputSchema(): { readonly type: "object"; readonly properties: { readonly image: { readonly oneOf: readonly [{ readonly type: "string"; readonly format: "image:data-uri"; }, { readonly type: "object"; readonly format: "image"; }]; readonly title: "Image"; readonly description: "Image"; readonly format: "image"; }; }; readonly required: readonly ["image"]; readonly additionalProperties: false; }; protected readonly filterName = "threshold"; protected opParams(input: ImageThresholdTaskInput & Record): ThresholdParams; } declare module "@workglow/task-graph" { interface Workflow { imageThreshold: CreateWorkflow, ImageThresholdTaskOutput, TaskConfig>; } }