UNPKG

image-stylize

Version:

Image Stylize Library is a TypeScript library for image processing and filter effects.

84 lines (75 loc) 1.44 kB
export type TEffectType = | "blur" | "texty" | "grayscale" | "leca" | "pixel" | "oil"; /** Canvas init params */ export type TStylize = { width: number; height: number; container: HTMLElement | null; }; export type TSize = { width: number; height: number; }; /** Texty effect init params */ export type TTextyConfig = { /** image url */ url: string; /** text */ text: string; /** scale */ scale: number; /** orderly */ orderly: boolean; }; /** Gaussian blur init params */ export type TGaussianBlurConfig = { /** image url */ url: string; /** blur radius */ radius: number; }; /** Gray scale init params */ export type TGrayScaleConfig = { /** image url */ url: string; }; /** Gray scale init params */ export type TLecaConfig = { /** image url */ url: string; }; /** Pixel init params */ export type TPixelConfig = { /** image url */ url: string; /** blur radius */ radius: number; /** pixel average */ avarage: number; }; /** Oil painting init params */ export type TOilPaintint = { /** image url */ url: string; /** oil paintint radius */ radius: number; /** oil paintint intensity */ intensity: number; }; /** Effect init params */ export type TEffectConfig = { type: TEffectType; /** Gaussian blur init params */ data: | TGaussianBlurConfig | TTextyConfig | TGrayScaleConfig | TLecaConfig | TPixelConfig | TOilPaintint; };