Add gegl:median-blur.
This commit is contained in:
parent
1828a82c82
commit
e14c9ae2a6
|
@ -4,6 +4,7 @@ export * from './cell-noise.js';
|
|||
export * from './crop.js';
|
||||
export * from './focus-blur.js';
|
||||
export * from './generic.js';
|
||||
export * from './median-blur.js';
|
||||
export * from './mirrors.js';
|
||||
export * from './mosaic.js';
|
||||
export * from './newsprint.js';
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
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});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue