-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
109 lines (96 loc) · 5.89 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="robots" content="noindex">
<title>Pixel Filter in AngularJS</title>
<script src="js/angular.min.js"></script>
<script src="js/ng-webworker.min.js"></script>
<script src="js/angular-file-saver.bundle.min.js"></script>
<script src="js/PixelFilter.js"></script>
</head>
<body>
<br/>
<div>
<div class = "row">
<div class = "col-sm-1"></div>
<div class="col-sm-10 border border-secondary rounded">
<br/>
<h1 class = "text-primary">PixelFIlterJS</h1><br/>
<div ng-app="PixelFilter">
<div ng-controller="PixelFilterController">
<input type="file" multiple name="InputImageFiles" id = "InputImageFiles" input-bind class="btn btn-outline-secondary" ng-disabled = "Processing" /><br/><br/>
<input type="button" class="btn btn-outline-primary" value="Upload image" ng-click="LoadInputImage()" ng-disabled = "Processing"/>
<br/><br/>
<div>
<img ng-src="{{InputImage}}" id = "InputImage"/>
</div>
<br/>
<h2 class = "text-warning">Select filter <span class = "text-secondary">({{Filters.length}})</span></h2>
<select class="form-control" ng-model="FilterChosen" ng-disabled = "Processing" ng-change = "SelectFilter()">
<option ng-repeat="option in Filters" value="{{option.name}}">{{option.name}} - {{option.description}}</option>
</select><br/>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="Threshold" ng-model = "Threshold" ng-checked = "Threshold" ng-disabled = "(ScalingProgress > 0 && ScalingProgress < 1)">
<label class="custom-control-label" for="Threshold">Use threshold for color comparisons</label>
</div><br/>
<h2 ng-show = "Parameters.length > 0" class = "text-success">Scale / Parameter value</h2>
<select class="form-control" ng-model="Parameter" ng-disabled = "Processing" ng-show = "Parameters.length > 0">
<option ng-repeat="option in Parameters" value="{{option}}">{{option}}</option>
</select>
<br ng-show = "ScalingProgress > 0 && ScalingProgress <= 1"/>
<progress class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" ng-show = "ScalingProgress > 0 && ScalingProgress < 1" value="{{ScalingProgress}}"></progress><br ng-show = "ScalingProgress >= 0 && ScalingProgress < 1"/>
<input type="button" class="btn btn-outline-success" value="Apply filter" ng-click="ApplyFilter()" ng-disabled = "Processing"/> <input type="button" class="btn btn-outline-primary" value="Add filter" ng-click="AddFilter()" ng-disabled = "Processing"/><br/><br/>
<div ng-show = "FilterQueue.length > 0">
<h2 class = "text-warning">Filter Queue <span class = "text-secondary">({{FilterQueue.length}})</span></h2><br/>
<ul class="list-group">
<div class = "row">
<div class = "col-sm-5">
<li class="list-group-item" ng-repeat="filter in FilterQueue track by $index">{{filter.name}} ({{filter.parameter}}) - Color Threshold: {{filter.threshold ? 'Yes' : 'No'}} <input type="button" class = "btn btn-outline-danger" value = " remove " ng-click="RemoveFilter($index)" ng-disabled = "Processing" style = "display: block; float: right;"/><br/><br/></li>
</div>
</div>
</ul>
<br/>
<input type="button" class="btn btn-outline-warning" value="Apply All Filters" ng-click="ApplyAllFilters()" ng-disabled = "Processing"/> <input type="button" class="btn btn-outline-danger" value="Clear All Filters" ng-click="ClearFilters()" ng-disabled = "Processing"/><br/><br/>
</div>
<div>
<canvas id = "OutputCanvas"></canvas>
<br/>
</div>
</div>
</div>
</div>
<div class = "col-sm-1"></div>
</div>
</div>
<br/><br/>
<!-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> -->
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> -->
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> -->
<script src="js/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="js/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<link rel="stylesheet" href="css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script>
(function () {
// see: https://www.michalspacek.com/using-javascript-to-modify-urls-and-hide-fbclid
var param = 'fbclid';
if (location.search.indexOf(param + '=') !== -1) {
var replace = '';
try {
var url = new URL(location);
url.searchParams.delete(param);
replace = url.href;
} catch (ex) {
var regExp = new RegExp('[?&]' + param + '=.*$');
replace = location.search.replace(regExp, '');
replace = location.pathname + replace + location.hash;
}
history.replaceState(null, '', replace);
}
})();
</script>
</body>
</html>