interlinked/source/gegl/median-blur.ts

33 lines
770 B
TypeScript
Raw Normal View History

2022-03-10 17:17:11 +00:00
import {BaseOperation} from './base.js';
export interface MedianBlurParameters {
abyssPolicy: 'none' | 'clamp';
alphaPercentile: number;
highPrecision: boolean;
neighborhood: 'square' | 'circle' | 'diamond';
percentile: number;
radius: number;
}
export class MedianBlur extends BaseOperation<MedianBlurParameters> {
public static default: MedianBlurParameters = {
abyssPolicy: 'clamp',
alphaPercentile: 50,
highPrecision: false,
neighborhood: 'circle',
percentile: 50,
radius: 3,
};
public get default() {
return MedianBlur.default;
}
public appendCrop = false;
public name = 'gegl:median-blur';
constructor(parameters?: Partial<MedianBlurParameters>) {
super({...MedianBlur.default, ...parameters});
}
}