-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
285 lines (243 loc) · 12 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Image Splitter</title>
<meta name="description" content="Photo editor that splits and mirrors imagess">
<meta name="author" content="Daniel Petersen">
<meta name="keywords" content="image, photo, splitter, editor, mirror">
<!-- Bootstrap core CSS -->
<link href="dist/bootstrap.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="dist/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta property="og:url" content="http://www.imagesplitter.ca" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Image Splitter" />
<meta property="og:description" content="Photo editor that splits and mirrors images" />
<meta property="og:image" content="http://www.imagesplitter.ca/includes/images/image_splitter_icon.jpg" />
<meta property="fb:app_id" content="856242944477715" />
</head>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '856242944477715',
xfbml : true,
version : 'v2.7'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-82413688-2', 'auto');
ga('send', 'pageview');
</script>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Image Splitter | Photo Editor</a>
</div>
<div id="navbar" class="collapse navbar-collapse navbar-right">
<ul class="nav navbar-nav">
<li style="margin-right: 40px;"><a href="http://www.danielpetersen.ca" target="_blank">Developer</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav><br>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '856242944477715',
xfbml : true,
version : 'v2.7'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<link href='includes/style.css' rel='stylesheet' type='text/css'>
<div style="text-align: center;">
<h1>Image Splitter</h1>
<p class="lead">
A photo editor for mirroring images<br>
Move the sliders to create something new<br>
<a href="https://www.youtube.com/watch?v=hCHb6mRq3P4" target="_blank"><span class="video-link-text">See the demo video here</span></a>
</p>
</div><br><br>
<div class="container-fluid">
<div class="row">
<div class="col-sm-5 col-sm-offset-1 col-lg-4">
<div class="col-xs-9 col-xs-offset-3" style="padding-bottom: 6px;">
<div
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="false">
</div>
</div>
<div class="col-xs-3">
<label class="pull-right">Upload:</label>
</div>
<div class="col-xs-9">
<input type="file" id="image-upload">
</div><br><br>
<div class="hidden-xs">
<br>
</div>
<div class="col-xs-9 col-xs-offset-3">
<button class="btn btn-primary btn-sm" onclick="reset()">Reset</button>
<button class="btn btn-primary btn-sm" onclick="flip_image()">Flip</button>
<button class="btn btn-primary btn-sm" onclick="set_quad()" id="quad_button">x4</button>
</div>
</div>
<div class="col-xs-12 hidden-sm hidden-md hidden-lg">
<br>
</div>
<div class="col-sm-6">
<div class="col-xs-3">
<label class="pull-right">Rotation:</label>
</div>
<div class="col-xs-7" style="padding-right: 4px;">
<input type="range" class="form-control" min="-200" max="200" value="0" oninput="set_rotation(this.value)" onchange="set_rotation(this.value)" id="rotation_slider">
</div>
<div class="col-xs-2" style="padding: 0;">
<button class="btn btn-primary btn-xs" onclick="rotate_45()" id="rotate_45_button">45°</button>
<input type="number" class="rotation-input" id="rotation_input">
</div>
<div class="col-xs-3">
<label class="pull-right">Position:</label>
</div>
<div class="col-xs-9 col-md-6">
<input type="range" class="form-control" min="-100" max="100" value="0" oninput="set_offset(this.value)" onchange="set_offset(this.value)" id="position_slider">
</div>
<div class="col-xs-9 col-xs-offset-3 col-md-3 col-md-offset-0">
<input type="range" class="form-control" min="-100" max="100" value="0" oninput="set_y_offset(this.value)" onchange="set_y_offset(this.value)" id="position_y_slider">
</div>
<div class="col-xs-3">
<label class="pull-right">Size:</label>
</div>
<div class="col-xs-9">
<input type="range" class="form-control" min="50" max="300" value="100" oninput="set_size(this.value)" onchange="set_size(this.value)" id="size_slider">
</div>
</div>
</div>
</div>
<div style="text-align: center; margin-bottom: 6px;">
<!-- can't have line breaks at the end or it puts a space between the canvasses -->
<canvas id="myCanvas1" class="canvas">
</canvas><canvas id="myCanvas2" class="canvas">
</canvas><br>
<canvas id="myCanvas3" class="canvas">
</canvas><canvas id="myCanvas4" class="canvas">
</canvas>
<canvas style="display: none;" id="tempCanvas" class="canvas"></canvas>
</div>
<div class="download-container">
<button class="btn btn-primary" style="display: inline-block;" onclick="create_image()">Create Image</button>
<div style="width: 60px; display: inline-block; vertical-align: middle; margin-right: 10px;"><label class="pull-right" >Crop:</label></div>
<input type="range" style="display: inline-block; width: 300px; vertical-align: middle;" min="0" max="350" value="0" oninput="set_crop(this.value)" onchange="set_crop(this.value)" id="crop_slider">
</div>
<hr style="margin: 4px auto; width: 800px; max-width: 100%;">
<div class="download-container" id="save_image_div">
<h4>Images</h4>
Right click and use 'Save image as' to download image or long press on mobile.<br>
<div id="save_image_1_div" class="image_save_div" style="text-align: center;">
<img id="save_image_1" class="saved-image"><br>
<div style="padding: 2px;">
<button class="btn btn-primary btn-sm add-button" onclick="add_saved_image(1)" id="add_image_1">add</button>
<button class="btn btn-primary btn-sm" onclick="download(1)" id="download_1">download</button>
<button class="btn btn-primary btn-sm" onclick="show_image(1)">view</button>
</div>
</div><div id="save_image_2_div" class="image_save_div" style="text-align: center;">
<img id="save_image_2" class="saved-image"><br>
<button class="btn btn-primary btn-sm add-button" onclick="add_saved_image(2)" id="add_image_2">add</button>
<button class="btn btn-primary btn-sm" onclick="download(2)" id="download_2">download</button>
<button class="btn btn-primary btn-sm" onclick="show_image(2)">view</button>
</div><div id="save_image_3_div" class="image_save_div" style="text-align: center;">
<img id="save_image_3" class="saved-image"><br>
<button class="btn btn-primary btn-sm add-button" onclick="add_saved_image(3)" id="add_image_3">add</button>
<button class="btn btn-primary btn-sm"onclick="download(3)" id="download_3">download</button>
<button class="btn btn-primary btn-sm" onclick="show_image(3)">view</button>
</div><div id="save_image_4_div" class="image_save_div" style="text-align: center;">
<img id="save_image_4" class="saved-image"><br>
<button class="btn btn-primary btn-sm add-button" onclick="add_saved_image(4)" id="add_image_4">add</button>
<button class="btn btn-primary btn-sm" onclick="download(4)" id="download_4">download</button>
<button class="btn btn-primary btn-sm" onclick="show_image(4)">view</button>
</div>
</div>
<div id="image-viewer-div" style="display: none; margin-top: 6px; text-align: center; max-width: 100%;">
<img id="image-viewer" style="max-width: 100%;"><br>
<div style="width: 800px; margin: auto; text-align: left;">
<button onclick="remove_image()" class="btn btn-primary btn-sm add-button">remove</button>
</div>
</div>
<hr style="margin: 4px auto; width: 800px; max-width: 100%">
<div class="download-container">
<h4>Samples</h4>
<div class="image_save_div" style="display: inline-block;" >
<img src="includes/images/tree_200.jpg" class="saved-image"><br>
<button onclick="add_image(1)" class="btn btn-primary btn-sm add-button">add</button>
</div>
<div class="image_save_div" style="display: inline-block;" >
<img src="includes/images/clouds_200.jpg" class="saved-image"><br>
<button onclick="add_image(2)" class="btn btn-primary btn-sm add-button">add</button>
</div>
<div class="image_save_div" style="display: inline-block;" >
<img src="includes/images/cat_200.jpg" class="saved-image"><br>
<button onclick="add_image(3)" class="btn btn-primary btn-sm add-button">add</button>
</div>
<div class="image_save_div" style="display: inline-block;" >
<img src="includes/images/city_200.jpg" class="saved-image"><br>
<button onclick="add_image(4)" class="btn btn-primary btn-sm add-button">add</button>
</div>
</div>
<br><br><br>
<br><br><br>
<div style="background-color: #222; color: #ccc; padding: 20px; text-align: center;">
©
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
<span> Daniel Petersen. All rights reserved.</span>
</div>
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.0/themes/blitzer/jquery-ui.css">
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<script src="includes/script.js"></script>
<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="dist/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="dist/ie10-viewport-bug-workaround.js"></script>
</body>
</html>