Pixie currently ships with 18 lightning fast filters that use WebGL, if available, or canvas fallback otherwise and allows you to create custom filters.
var pixie = new Pixie({
onLoad: function() {
pixie.tools.filter.apply(filterTool.getByName('grayscale'));
}
});
To show only specific filters, specify names of the filters that should be shown using items
option and set replaceDefault
to true
.
var pixie = new Pixie({
tools: {
filter: {
replaceDefault: true,
items: ['brightness', 'noise', 'pixelate'],
}
}
})
Apply specified filter to all images.
apply(filterName: string): void
Remove specified filter from all images.
remove(filterName: string): void
Get a list of all available filters.
getAll(): FilterConfig[]
Get configuration for specified filter.
getByName(name: string): FilterConfig
Check if specified filter is currently applied.
isApplied(name: string): boolean
Change specified value for an active filter.
applyValue(filterName: string, optionName: string, optionValue: string | number): void
Create a custom filter.
addCustom(name: string, filter: object, editableOptions?: FilterOptions, initialConfig?: object): void