-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathindex.html
267 lines (255 loc) · 13.6 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
<!doctype html>
<html lang="en-US">
<head>
<title>BIRME - Variant For SD</title>
<meta charset="utf-8" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" type="text/css" href="css/meddon.css">
<meta name="viewport" content="initial-scale=0.5, maximum-scale=1" />
<meta name="robots" content="noindex">
<meta name="description"
content="BIRME is a flexible and easy to use bulk image resizer.
It can resize multiple images to any specific dimension and crop images if necessary. It's an online tool and you don't need to download or install on your computer. BIRME is absolutely free to use. It works on both Mac and Windows machines." />
<link rel="shortcut icon" type="image/png" href="static/images/favicon.png" />
<link rel="shortcut icon" href="static/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
<nav class="d-flex align-items-center justify-content-between pt-3 fixed-top">
<ul class="d-inline-block list-inline m-0">
<li class="list-inline-item">
<a class="logo mr-4" href="javascript:void(0)" onclick="birme.show_section('main')">Birme</a>
</li>
<li class="list-inline-item">
<a class="nav-link" href="javascript:void(0)" onclick="birme.show_section('about')">About Birme</a>
</li>
<li class="list-inline-item">
<a class="nav-link" href="https://birme.net/blog/">Blog</a>
</li>
</ul>
</nav>
<div class="section section-main">
<div class="preview-left">
<div class="tiles-holder"></div>
<div class="welcome">
<div class="text-center w-50">
<h1>Bulk Image Resizing Made Easy 2.0</h1>
<h4 class="mb-4 d-none"><b>BIRME</b> - <b>B</b>ulk <b>I</b>mage <b>R</b>esizing <b>M</b>ade <b>E</b>asy 2.0</h4>
<p>BIRME is a flexible and easy to use bulk image resizer. It can resize your images to any specific dimension and crop them proportionately if necessary. It's an online tool and you don't
need to download or install on your computer. BIRME is absolutely free to use.</p>
<div class="icon icon-drag"></div>
<p class="pb-0 mb-2 text-uppercase">Drop your images here</p>
<div class="small">- OR -</div>
<div class="btn-browse btn btn-primary">
<input type="file" id="file-1" class="inputfile" multiple onchange="birme.add_all(event)" />
<label><span>Browse from your computer</span></label>
</div>
<p class="mt-4"><a href="https://birme.net">(Looking for the real BIRME version 2?)</a></p>
<p class="mt-4"><a href="https://v1.birme.net">(Looking for version 1?)</a></p>
</div>
</div>
<div class="btn-browse btn btn-primary">
<input type="file" id="file-1" class="inputfile" multiple onchange="birme.add_all(event)" />
<label><span>Add more files</span></label>
</div>
</div>
<div class="panels">
<div class="panel panel-resize show">
<button type="button" onclick="config.toggle_panel(this)" class="btn btn-toggle">Resize / Crop</button>
<!-- Resize by pixel -->
<div class="options-holder " style="display: block">
<div class="width-input">
<div class="width-height mr-5">
<label for="target_width">Width</label>
<input type="number" id="target_width" min="1" onchange="config.update(this)" /> px
</div>
<label><input tabindex="-1" type="checkbox" id="auto_width" onchange="config.update(this)" /> Auto Width</label>
</div>
<div class="height-input mt-2">
<div class="width-height mr-5">
<label for="target_width">Height</label>
<input type="number" id="target_height" min="1" onchange="config.update(this)" /> px
</div>
<label><input tabindex="-1" type="checkbox" id="auto_height" onchange="config.update(this)" /> Auto Height</label>
</div>
<div class="height-input mt-2 ratio">
<div class="width-height mr-5">
<label for="target_width">Ratio</label>
<input id="ratio_w" type="number" class="w-25" onchange="config.update_ratio()"></input> :
<input id="ratio_h" class="w-25" type="number" onchange="config.update_ratio()"></input>
</div>
</div>
<div class="crop-auto mt-2 d-none">
<input type="checkbox" onchange="config.update(this)" id="auto_focal" />
<label for="auto_focal">Auto detect image focal point</label>
</div>
<div class="crop-align mt-4 d-none">
<div class="anchor-points mx-auto">
<div data-n="0" onclick="config.set_focal(this)"></div>
<div data-n="1" onclick="config.set_focal(this)"></div>
<div data-n="2" onclick="config.set_focal(this)"></div>
<div data-n="3" onclick="config.set_focal(this)"></div>
<div data-n="4" onclick="config.set_focal(this)"></div>
<div data-n="5" onclick="config.set_focal(this)"></div>
<div data-n="6" onclick="config.set_focal(this)"></div>
<div data-n="7" onclick="config.set_focal(this)"></div>
<div data-n="8" onclick="config.set_focal(this)"></div>
<div data-n="9" onclick="config.set_focal(this)"></div>
</div>
<div class="mt-2 text-center">Set image focal point</div>
</div>
<label class="no-resize"><input tabindex="-1" type="checkbox" id="no_resize" onchange="config.update(this)" /> Do not resize</label>
</div>
</div>
<!-- BORDER -->
<div class="panel">
<div class="d-flex">
<button type="button" onclick="birme.show_modal('wm')" class="btn btn-wm w-50 mr-1">Watermark</button>
<button type="button" onclick="config.toggle_panel(this.parentNode)" class="btn btn-toggle w-50">Border</button>
</div>
<div class="options-holder">
<div class="border-options d-flex justify-content-between">
<div>
Color:
<input type="color" id="border_color" onchange="config.update(this)" />
</div>
<div>
Thickness:
<input type="number" id="border_width" onchange="config.update(this)" />
</div>
</div>
</div>
</div>
<div class="panel">
<button type="button" onclick="config.toggle_panel(this)" class="btn btn-toggle">Image Format & Quality</button>
<div class="options-holder">
<div class="d-flex justify-content-between align-items-center mb-2">
<div>
<label for="quality_preset_select">Quality Preset: </label>
<select type="select" name="quality_preset_select" id="quality_preset" onchange="config.update(this)">
<option value="disabled">Disabled</option>
<option value="low">Low</option>
<option value="medium">Medium</option>
<option value="high" selected>High</option>
<option value="hermite">Hermite</option>
</select>
</div>
</div>
<div class="d-flex justify-content-between align-items-center mb-2">
<div>
<input type="radio" name="image_format" id="image_format_preserve" value="preserve" onchange="config.update(this)" />
<label for="image_format_preserve">Same as original images</label>
</div>
</div>
<div class="d-flex justify-content-between align-items-center mb-2">
<div>
<input type="radio" name="image_format" id="image_format_jpeg" value="jpeg" onchange="config.update(this)" />
<label for="image_format_jpeg">JPEG</label>
</div>
<div>Quality <input type="number" min="10" id="quality_jpeg" onchange="config.update(this)" />%</div>
</div>
<div class="d-flex justify-content-between align-items-center">
<div>
<input type="radio" name="image_format" id="image_format_webp" value="webp" onchange="config.update(this)" />
<label for="image_format_webp">WEBP</label>
</div>
<div>Quality <input type="number" min="10" id="quality_webp" onchange="config.update(this)" />%</div>
</div>
<a href="https://www.birme.net/blog/best-jpeg-quality-for-bulk-image-resizing/" target="_blank">Need Help?</a>
</div>
</div>
<!-- RENAME -->
<div class="panel">
<button type="button" onclick="config.toggle_panel(this)" class="btn btn-toggle">Rename</button>
<div class="options-holder">
File name pattern e.g. image-xxx<br/> or ORIGINAL-NAME_400x400
<input type="text" id="rename" onchange="config.update(this)" />
<br />
<br />
File name starting number
<input type="number" id="rename_start" onchange="config.update(this)" class="w-100" />
</div>
</div>
<div class="save-btns d-flex mb-2">
<div class="w-50 pr-1">
<button type="button" class="btn btn-primary btn-sm w-100 mr-1" onclick="birme.save_all(true);">
Save as zip
</button>
</div>
<div class="w-50 pl-1">
<button type="button" class="btn btn-primary btn-sm w-100" onclick="birme.save_all(false);">Save files</button>
</div>
</div>
<div class="d-flex">
<a class="btn btn-sm btn-remove w-50" href="javascript:document.location.reload()">Remove All</a>
<a class="btn btn-sm btn-reset w-50" href="javascript:config.load(true)">Reset Settings</a>
</div>
</div></div>
<div class="section section-about">
<div class="content col-md-6 offset-md-3 col-xl-4 offset-xl-4">
<h2>About</h2>
<p>I made this simple copy of BIRME to add more image quality options for Stable Diffusion users who crop training images!</p>
<p>NOTE: FIREFOX NOT SUPPORTED (<a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality#browser_compatibility">supported browsers</a>)</p>
<p><a href="https://birme.net">Support the author of BIRME</a></p>
</div>
</div>
<div class="modal">
<div class="loading">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0"
width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g>
<path d="M75.4 126.63a11.43 11.43 0 0 1-2.1-22.65 40.9 40.9 0 0 0 30.5-30.6 11.4 11.4 0 1 1 22.27 4.87h.02a63.77 63.77 0 0 1-47.8 48.05v-.02a11.38 11.38 0 0 1-2.93.37z" fill="#000000"
fill-opacity="1" />
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="360 64 64" dur="1400ms" repeatCount="indefinite"></animateTransform>
</g>
</svg>
<br />
Processing...
</div>
<div class="wm">
<div class="wm-preview">
<img src=static/images/watermark.webp class="w-100" />
<div class="text"></div>
<div class="image"></div>
</div>
<div class="wm-settings p-4">
<div class="icon icon-delete " onclick="birme.hide_modal()"></div>
<div class="form-group">
<label for="wm_text">Watermark text</label>
<input type="text" class="form-control" id="wm_text" name="wm_text" placeholder="" onkeyup="config.update(this)" />
</div>
<div class="form-group">
<label for="wm_font">Font</label>
<select type="select" class="form-control" id="wm_font" name="wm_font" onchange="config.update(this)">
<option value="sans-serif">Arial/Helvetica</option>
<option value="serif">Times New Roman</option>
<option value="cursive">Cursive/Script</option>
</select>
</div>
<div class="form-group">
<label for="wm_size">Font Size</label>
<input type="number" min="5" max="100" id="wm_size" name="wm_size" onchange="config.update(this)">
</div>
<hr />
<h3 class="text-center"> Or </h3>
<div class="form-group text-center">
<div class="btn-browse btn btn-primary" style="position: relative;">
<input type="file" class="inputfile" onchange="config.upload_wm(event)" />
<label><span>Upload a watermark image</span></label>
</div>
<div class="wm_image">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-load-image/5.16.0/load-image.all.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/smartcrop/2.0.5/smartcrop.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.0/FileSaver.min.js"></script>
<script src="js/hermite.js"></script>
<script src="js/main.js"></script>
</body>
</html>