added edge detect filter...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-11-10 04:01:53 +03:00
parent 420765823f
commit 50dbb406ea
6 changed files with 35 additions and 1 deletions

View File

@ -154,6 +154,10 @@ body {
.image-show-highlights {
filter: contrast(0.8) brightness(0.6) contrast(1.2);
}
.image-edge-detect {
-webkit-filter: url(#EdgeDetect);
filter: url(#EdgeDetect);
}

View File

@ -208,6 +208,10 @@
/*********************************************************************/
.svg-filters {
display: none;
}
:focus {
outline: rgba(255, 255, 255, 0.5) 1px solid;
}

View File

@ -92,6 +92,19 @@ requirejs('ui')
</head>
<body>
<div class="svg-filters">
<!-- edge detect -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0%" height="0%">
<filter id="EdgeDetect">
<feConvolveMatrix order="3 3" preserveAlpha="true" kernelMatrix="-1 -1 -1 -1 8 -1 -1 -1 -1"/>
</filter>
</svg>
</div>
<!-- for viewer structure doc see: ribbons.js... -->
<!--div class="viewer gray marks-visible" empty-help="Press 'O' to load, 'F1' for help or '?' for keyboard mappings."-->

View File

@ -445,8 +445,9 @@ module.GLOBAL_KEYBOARD = {
';': 'togglePreviewFilter: "Show shadows" -- Preview shadows',
':': 'togglePreviewFilter: "Show highlights" -- Preview highlights',
'caps+:': ':',
//'ctrl-;': 'togglePreviewFilter: "Show highlights" -- Preview highlights',
"'": 'togglePreviewFilter: "Black and white" -- Preview black and white',
'"': 'togglePreviewFilter: "Edge detect" -- Show edges',
'caps+"': '"',
// doc...
// XXX for debug...

View File

@ -2147,6 +2147,7 @@ module.PreviewFilters = core.ImageGridFeatures.Feature({
'Black and white': 'image-bw',
'Show shadows': 'image-show-shadows',
'Show highlights': 'image-show-highlights',
'Edge detect': 'image-edge-detect',
'No filters': 'none',
},
},

View File

@ -100,6 +100,17 @@ requirejs(['ui'])
</head>
<body>
<div class="svg-filters">
<!-- edge detect -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0%" height="0%">
<filter id="EdgeDetect">
<feConvolveMatrix order="3 3" preserveAlpha="true" kernelMatrix="-1 -1 -1 -1 8 -1 -1 -1 -1"/>
</filter>
</svg>
</div>
<!-- for viewer structure doc see: ribbons.js... -->
<!--div class="viewer gray marks-visible" empty-help="Press 'O' to load, 'F1' for help or '?' for keyboard mappings."-->