-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
90 lines (85 loc) · 4.1 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
<!doctype html>
<html>
<head>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="./styles.css">
<title>Seam Carver visualizer</title>
</head>
<body>
<div id="root" class="container">
<h1 class="display-4" style="margin-top: 3rem;">Seam Carving visualizer</h1>
<p class="lead">
Seam-carving is a content-aware image resizing technique where the image is reduced in size by one pixel of height (or width) at a time. Unlike standard content-agnostic resizing techniques (such as cropping and scaling), seam carving preserves the most interest features (aspect ratio, set of objects present, etc.) of the image.
</p>
<form style="margin-top: 3rem;">
<div class="row">
<div class="col input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroupFileAddon01">Upload</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" id="file-input" accept="image/*" aria-describedby="file-input">
<label class="custom-file-label" for="file-input">Choose image</label>
</div>
</div>
</div>
<div>
<div class="form-check">
<input class="form-check-input" type="radio" name="processing-option" id="processing-option-cloud" value="webassembly" checked>
<label class="form-check-label" for="processing-option-cloud">
WebAssembly
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="processing-option" id="processing-option-web-worker" value="web-worker">
<label class="form-check-label" for="processing-option-web-worker">
Web Worker
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="processing-option" id="processing-option-cloud" value="cloud">
<label class="form-check-label" for="processing-option-cloud">
Cloud Function
</label>
</div>
</div>
<div class="row" style="margin-top: 1rem">
<div class="col form-group">
<label for="width">Width</label>
<input type="range" class="form-control-range" id="width" name="width" min="0" max="100">
</div>
</div>
</form>
</div>
<div class="hidden border border-danger invisible" style="margin: 0 auto;">
<canvas id="image-preview"></canvas>
</div>
<!-- Modal -->
<div class="modal fade" id="progress-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Carving image ...</h5>
</div>
<div class="modal-body">
<div class="progress">
<div id="progress-bar" class="progress-bar" role="progressbar" style="width: 0%"></div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="./src/index.ts"></script>
</html>