openseadragon 颜色过滤
当前支持颜色
伽马值 默认1 范围0-5 步距0.1
对比度 默认0 范围-100-100 步距1
红色值 默认0 范围-100-100 步距1
绿色值 默认0 范围-100-100 步距1
蓝色值 默认0 范围-100-100 步距1
亮度 默认0 范围-255-255 步距1
import OpenSeadragon from "openseadragon";
import FilterPlugin from "filterplugin";
const view = ref();
view.value = OpenSeadragon({
id: "seadragon-viewer",
prefixUrl: "//openseadragon.github.io/openseadragon/images/",
tileSources: duomo,
showNavigator: true,
navigatorAutoFade: false,
crossOriginPolicy: "Anonymous",
});
//val 值 type类型
const changeFilter = () => {
view.value.setFilterOptions({
filters: {
processors: [
FilterPlugin.Filters.ADJUST('伽马值','对比度','亮度','红色值','绿色值','蓝色值'),
),
],
},
});
};
/**重置*/
view.value.setFilterOptions({
filters: {
processors: [
FilterPlugin.Filters.ADJUST('伽马值','对比度','亮度','红色值','绿色值','蓝色值'),
],
},
});